home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume25 / rcs-5.6 / part01 next >
Encoding:
Text File  |  1991-12-19  |  93.5 KB  |  3,338 lines

  1. Newsgroups: comp.sources.unix
  2. From: hammer@cs.purdue.edu (Adam Hammer)
  3. Subject: v25i077: rcs-5.6 - Revision Control System, V5.6, Part01/11
  4. Sender: sources-moderator@pa.dec.com
  5. Approved: vixie@pa.dec.com
  6.  
  7. Submitted-By: hammer@cs.purdue.edu (Adam Hammer)
  8. Posting-Number: Volume 25, Issue 77
  9. Archive-Name: rcs-5.6/part01
  10.  
  11. [ I split the rcs.ps (postscript version of the manual) into two parts.
  12.   You will need to reassemble them with cat(1) before printing them. --vix ]
  13.  
  14. #! /bin/sh
  15. # This is a shell archive.  Remove anything before this line, then unpack
  16. # it by saving it into a file and typing "sh file".  To overwrite existing
  17. # files, type "sh file -c".  You can also feed this as standard input via
  18. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  19. # will see the following message at the end:
  20. #        "End of archive 1 (of 11)."
  21. # Contents:  MANIFEST Makefile README man man/Makefile man/ident.1
  22. #   man/merge.1 man/rcsclean.1 man/rcsdiff.1 man/rcsfile.5
  23. #   man/rcsfreeze.1 man/rcsmerge.1 man/rlog.1 rcs_func.ms src
  24. #   src/Makefile src/ident.c src/merge.c src/merger.c src/rcsclean.c
  25. #   src/rcsfreeze.sh src/rcskeys.c src/rcsmap.c
  26. # Wrapped by vixie@cognition.pa.dec.com on Fri Dec 20 16:23:39 1991
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  30. else
  31. echo shar: Extracting \"'MANIFEST'\" \(1770 characters\)
  32. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  33. X   File Name        Archive #    Description
  34. X-----------------------------------------------------------
  35. X COPYING                    3    
  36. X MANIFEST                   1    
  37. X Makefile                   1    
  38. X README                     1    
  39. X man                        1    
  40. X man/Makefile               1    
  41. X man/ci.1                   3    
  42. X man/co.1                   3    
  43. X man/ident.1                1    
  44. X man/merge.1                1    
  45. X man/rcs.1                  2    
  46. X man/rcsclean.1             1    
  47. X man/rcsdiff.1              1    
  48. X man/rcsfile.5              1    
  49. X man/rcsfreeze.1            1    
  50. X man/rcsintro.1             2    
  51. X man/rcsmerge.1             1    
  52. X man/rlog.1                 1    
  53. X rcs.ms                     9    
  54. X rcs.ps.part1              11    
  55. X rcs.ps.part2              10    
  56. X rcs_func.ms                1    
  57. X src                        1    
  58. X src/COPYING                4    
  59. X src/Makefile               1    
  60. X src/README                 2    
  61. X src/ci.c                   7    
  62. X src/co.c                   5    
  63. X src/conf.heg               3    
  64. X src/conf.sh                7    
  65. X src/ident.c                1    
  66. X src/maketime.c             2    
  67. X src/merge.c                1    
  68. X src/merger.c               1    
  69. X src/partime.c              4    
  70. X src/rcs.c                  8    
  71. X src/rcsbase.h              5    
  72. X src/rcsclean.c             1    
  73. X src/rcsdiff.c              2    
  74. X src/rcsedit.c              8    
  75. X src/rcsfcmp.c              2    
  76. X src/rcsfnms.c              6    
  77. X src/rcsfreeze.sh           1    
  78. X src/rcsgen.c               3    
  79. X src/rcskeep.c              2    
  80. X src/rcskeys.c              1    
  81. X src/rcslex.c               6    
  82. X src/rcsmap.c               1    
  83. X src/rcsmerge.c             2    
  84. X src/rcsrev.c               5    
  85. X src/rcssyn.c               4    
  86. X src/rcstest                2    
  87. X src/rcsutil.c              4    
  88. X src/rlog.c                 6    
  89. END_OF_FILE
  90. if test 1770 -ne `wc -c <'MANIFEST'`; then
  91.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  92. fi
  93. # end of 'MANIFEST'
  94. fi
  95. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  96.   echo shar: Will not clobber existing file \"'Makefile'\"
  97. else
  98. echo shar: Extracting \"'Makefile'\" \(300 characters\)
  99. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  100. SUBDIR=    src man
  101. DESTDIR=
  102. X
  103. all: ${SUBDIR}
  104. X
  105. X${SUBDIR}: FRC
  106. X    cd $@; make ${MFLAGS} DESTDIR=${DESTDIR}
  107. X
  108. install:
  109. X    for i in ${SUBDIR}; do \
  110. X        (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); \
  111. X    done
  112. X
  113. clean:
  114. X    for i in ${SUBDIR}; do \
  115. X        (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} clean); \
  116. X    done
  117. X
  118. XFRC:
  119. X
  120. END_OF_FILE
  121. if test 300 -ne `wc -c <'Makefile'`; then
  122.     echo shar: \"'Makefile'\" unpacked with wrong size!
  123. fi
  124. # end of 'Makefile'
  125. fi
  126. if test -f 'README' -a "${1}" != "-c" ; then 
  127.   echo shar: Will not clobber existing file \"'README'\"
  128. else
  129. echo shar: Extracting \"'README'\" \(17679 characters\)
  130. sed "s/^X//" >'README' <<'END_OF_FILE'
  131. This directory contains complete sources for RCS version 5.6.
  132. X
  133. RCS, the Revision Control System, manages multiple revisions of files.
  134. RCS can store, retrieve, log, identify, and merge revisions.
  135. It is useful for files that are revised frequently,
  136. e.g. programs, documentation, graphics, and papers.
  137. X
  138. X/* Copyright (C) 1982, 1988, 1989 Walter Tichy
  139. X   Copyright 1990, 1991 by Paul Eggert
  140. X   Distributed under license by the Free Software Foundation, Inc.
  141. X
  142. This file is part of RCS.
  143. X
  144. RCS is free software; you can redistribute it and/or modify
  145. it under the terms of the GNU General Public License as published by
  146. the Free Software Foundation; either version 2, or (at your option)
  147. any later version.
  148. X
  149. RCS is distributed in the hope that it will be useful,
  150. but WITHOUT ANY WARRANTY; without even the implied warranty of
  151. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  152. GNU General Public License for more details.
  153. X
  154. You should have received a copy of the GNU General Public License
  155. along with RCS; see the file COPYING.  If not, write to
  156. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  157. X
  158. Report problems and direct all questions to:
  159. X
  160. X    rcs-bugs@cs.purdue.edu
  161. X
  162. X*/
  163. X
  164. X$Id: README,v 5.16 1991/11/03 01:09:19 eggert Exp $
  165. X
  166. X
  167. Installation notes:
  168. X
  169. X  RCS requires a diff that supports the -n option.
  170. X  Get GNU diff (version 1.15 or later) if your diff lacks -n.
  171. X
  172. X  RCS works best with a diff that supports -a and -L,
  173. X  and a diff3 that supports -E and -m.
  174. X  GNU diff supports these options.
  175. X
  176. X  Sources for RCS are in the src directory.
  177. X  Read the directions in src/README to build RCS on your system.
  178. X
  179. X  Manual entries reside in man.
  180. X
  181. X  Troff source for the paper `RCS--A System for Version Control', which
  182. X  appeared in _Software--Practice & Experience_, is in rcs.ms.
  183. X
  184. X  If you don't have troff, you can get GNU groff to format the documentation.
  185. X
  186. X
  187. RCS compatibility notes:
  188. X
  189. X  RCS version 5 reads RCS files written by any RCS version released since 1982.
  190. X  It also writes RCS files that these older versions of RCS can read,
  191. X  unless you use one of the following new features:
  192. X
  193. X    checkin times after 1999/12/31 23:59:59 GMT
  194. X    checking in non-text files
  195. X    non-Ascii symbolic names
  196. X    rcs -bX, where X is nonempty
  197. X    rcs -kX, where X is not `kv'
  198. X    RCS files that exceed hardcoded limits in older RCS versions
  199. X
  200. X  A working file written by RCS 5.5 or later contains four-digit years in its
  201. X  keyword strings.  If you check out a working file with RCS 5.5 or later,
  202. X  an older RCS version's `ci -k' may insist on two-digit years.
  203. X  Fix this with `co -V4', or by editing the working file.
  204. X
  205. X
  206. XFeatures new to RCS version 5.6 include:
  207. X
  208. X  Security holes have been plugged; setgid use is no longer supported.
  209. X
  210. X  co can retrieve old revisions much more efficiently.
  211. X  To generate the Nth youngest revision on the trunk,
  212. X  the old method used up to N passes through copies of the working file;
  213. X  the new method uses a piece table to generate the working file in one pass.
  214. X
  215. X  When ci finds no changes in the working file,
  216. X  it automatically reverts to the previous revision unless -f is given.
  217. X
  218. X  RCS follows symbolic links to RCS files instead of breaking them,
  219. X  and warns when it breaks hard links to RCS files.
  220. X
  221. X  `$' stands for the revision number taken from working file keyword strings.
  222. X  E.g. if F contains an Id keyword string,
  223. X  `rcsdiff -r$ F' compares F to its checked-in revision, and
  224. X  `rcs -nL:$ F' gives the symbolic name L to F's revision.
  225. X
  226. X  co and ci's new -M option sets the modification time
  227. X  of the working file to be that of the revision.
  228. X  Without -M, ci now tries to avoid changing the working file's
  229. X  modification time if its contents are unchanged.
  230. X
  231. X  rcs's new -m option changes the log message of an old revision.
  232. X
  233. X  RCS is portable to hosts that do not permit `,' in filenames.
  234. X  (`,' is not part of the Posix portable filename character set.)
  235. X  A new -x option specifies extensions other than `,v' for RCS files.
  236. X  The Unix default is `-x,v/', so that the working file `w' corresponds
  237. X  to the first file in the list `RCS/w,v', `w,v', `RCS/w' that works.
  238. X  The non-Unix default is `-x', so that only `RCS/w' is tried.
  239. X  Eventually, the Unix default should change to `-x/,v'
  240. X  to encourage interoperability among all Posix hosts.
  241. X
  242. X  A new RCSINIT environment variable specifies defaults for options like -x.
  243. X
  244. X  The separator for revision ranges has been changed from `-' to `:', because
  245. X  the range `A-B' is ambiguous if `A', `B' and `A-B' are all symbolic names.
  246. X  E.g. the old `rlog -r1.5-1.7' is now `rlog -r1.5:1.7'; ditto for `rcs -o'.
  247. X  For a while RCS will still support (but warn about) the old `-' separator.
  248. X
  249. X  RCS manipulates its lock files using a method that is more reliable under NFS.
  250. X
  251. X  Experimental support for MS-DOS and OS/2 is available as part of a separate
  252. X  software distribution.
  253. X
  254. X
  255. XFeatures new to RCS version 5 include:
  256. X
  257. X  RCS can check in arbitrary files, not just text files, if diff -a works.
  258. X  RCS can merge lines containing just a single `.' if diff3 -m works.
  259. X  GNU diff supports the -a and -m options.
  260. X
  261. X  RCS can now be used as a setuid program.
  262. X  See ci(1) for how users can employ setuid copies of ci, co, and rcsclean.
  263. X  Setuid privileges yield extra security if the effective user owns RCS files
  264. X  and directories, and if only the effective user can write RCS directories.
  265. X  RCS uses the real user for all accesses other than writing RCS directories.
  266. X  As described in ci(1), there are three levels of setuid support.
  267. X
  268. X    1.  Setuid works fully if the seteuid() system call lets any
  269. X    process switch back and forth between real and effective users,
  270. X    as specified in Posix 1003.1a Draft 5.
  271. X
  272. X    2.  On hosts with saved setuids (a Posix 1003.1-1990 option) and without
  273. X    a modern seteuid(), setuid works unless the real or effective user is root.
  274. X
  275. X    3.  On hosts that lack both modern seteuid() and saved setuids,
  276. X    setuid does not work, and RCS uses the effective user for all accesses;
  277. X    formerly it was inconsistent.
  278. X
  279. X  New options to co, rcsdiff, and rcsmerge give more flexibility to keyword
  280. X  substitution.
  281. X
  282. X    -kkv substitutes the default `$Keyword: value $' for keyword strings.
  283. X    However, a locker's name is inserted only as a file is being locked,
  284. X    i.e. by `ci -l' and `co -l'.  This is normally the default.
  285. X
  286. X    -kkvl acts like -kkv, except that a locker's name is always inserted
  287. X    if the given revision is currently locked.  This was the default in
  288. X    version 4.  It is now the default only with when using rcsdiff to
  289. X    compare a revision to a working file whose mode is that of a file
  290. X    checked out for changes.
  291. X
  292. X    -kk substitutes just `$Keyword$', which helps to ignore keyword values
  293. X    when comparing revisions.
  294. X
  295. X    -ko retrieves the old revision's keyword string, thus bypassing keyword
  296. X    substitution.
  297. X
  298. X    -kv retrieves just `value'.  This can ease the use of keyword values, but
  299. X    it is dangerous because it causes RCS to lose track of where the keywords
  300. X    are, so for safety the owner write permission of the working file is
  301. X    turned off when -kv is used; to edit the file later, check it out again
  302. X    without -kv.
  303. X
  304. X  rcs -ko sets the default keyword substitution to be in the style of co -ko,
  305. X  and similarly for the other -k options.  This can be useful with binary file
  306. X  formats that cannot tolerate changing the lengths of keyword strings.
  307. X  However it also renders a RCS file readable only by RCS version 5 or later.
  308. X  Use rcs -kkv to restore the usual default substitution.
  309. X
  310. X  RCS can now be used by development groups that span timezone boundaries.
  311. X  All times are now displayed in GMT, and GMT is the default timezone.
  312. X  To use local time with co -d, append ` LT' to the time.
  313. X  When interchanging RCS files with sites running older versions of RCS,
  314. X  time stamp discrepancies may prevent checkins; to work around this,
  315. X  use `ci -d' with a time slightly in the future.
  316. X
  317. X  Dates are now displayed using four-digit years, not two-digit years.
  318. X  Years given in -d options must now have four digits.
  319. X  This change is required for RCS to continue to work after 1999/12/31.
  320. X  The form of dates in version 5 RCS files will not change until 2000/01/01,
  321. X  so in the meantime RCS files can still be interchanged with sites
  322. X  running older versions of RCS.  To make room for the longer dates,
  323. X  rlog now outputs `lines: +A -D' instead of `lines added/del: A/D'.
  324. X
  325. X  To help prevent diff programs that are broken or have run out of memory
  326. X  from trashing an RCS file, ci now checks diff output more carefully.
  327. X
  328. X  ci -k now handles the Log keyword, so that checking in a file
  329. X  with -k does not normally alter the file's contents.
  330. X
  331. X  RCS no longer outputs white space at the ends of lines
  332. X  unless the original working file had it.
  333. X  For consistency with other keywords,
  334. X  a space, not a tab, is now output after `$Log:'.
  335. X  Rlog now puts lockers and symbolic names on separate lines in the output
  336. X  to avoid generating lines that are too long.
  337. X  A similar fix has been made to lists in the RCS files themselves.
  338. X
  339. X  RCS no longer outputs the string `Locker: ' when expanding Header or Id
  340. X  keywords.  This saves space and reverts back to version 3 behavior.
  341. X
  342. X  The default branch is not put into the RCS file unless it is nonempty.
  343. X  Therefore, files generated by RCS version 5 can be read by RCS version 3
  344. X  unless they use the default branch feature introduced in version 4.
  345. X  This fixes a compatibility problem introduced by version 4.
  346. X
  347. X  RCS can now emulate older versions of RCS; see `co -V'.
  348. X  This may be useful to overcome compatibility problems
  349. X  due to the above changes.
  350. X
  351. X  Programs like Emacs can now interact with RCS commands via a pipe:
  352. X  the new -I option causes ci, co, and rcs to run interactively,
  353. X  even if standard input is not a terminal.
  354. X  These commands now accept multiple inputs from stdin separated by `.' lines.
  355. X
  356. X  ci now silently ignores the -t option if the RCS file already exists.
  357. X  This simplifies some shell scripts and improves security in setuid sites.
  358. X
  359. X  Descriptive text may be given directly in an argument of the form -t-string.
  360. X
  361. X  The character set for symbolic names has been upgraded
  362. X  from Ascii to ISO 8859.
  363. X
  364. X  rcsdiff now passes through all options used by GNU diff;
  365. X  this is a longer list than 4.3BSD diff.
  366. X
  367. X  merge's new -L option gives tags for merge's overlap report lines.
  368. X  This ability used to be present in a different, undocumented form;
  369. X  the new form is chosen for compatibility with GNU diff3's -L option.
  370. X
  371. X  rcsmerge and merge now have a -q option, just like their siblings do.
  372. X
  373. X  RCS now attempts to ignore parts of an RCS file that look like they come
  374. X  from a future version of RCS.
  375. X
  376. X  When properly configured, RCS now strictly conforms with Posix 1003.1-1990.
  377. X  RCS can still be compiled in non-Posix traditional Unix environments,
  378. X  and can use common BSD and USG extensions to Posix.
  379. X  RCS is a conforming Standard C program, and also compiles under traditional C.
  380. X
  381. X  Arbitrary limits on internal table sizes have been removed.
  382. X  The only limit now is the amount of memory available via malloc().
  383. X
  384. X  File temporaries, lock files, signals, and system call return codes
  385. X  are now handled more cleanly, portably, and quickly.
  386. X  Some race conditions have been removed.
  387. X
  388. X  A new compile-time option RCSPREFIX lets administrators avoid absolute path
  389. X  names for subsidiary programs, trading speed for flexibility.
  390. X
  391. X  The configuration procedure is now more automatic.
  392. X
  393. X  Snooping has been removed.
  394. X
  395. X
  396. Version 4 was the first version distributed by FSF.
  397. Beside bug fixes, features new to RCS version 4 include:
  398. X
  399. X  The notion of default branch has been added; see rcs -b.
  400. X
  401. X
  402. Version 3 was included in the 4.3BSD distribution.
  403. X
  404. X
  405. XFurther projects:
  406. X
  407. X  Add format options for finer control over the output of ident and rlog.
  408. X
  409. X  Be able to redo the most recent checkin with minor changes.
  410. X
  411. X  Add a `-' option to take the list of pathnames from standard input.
  412. X  Perhaps the pathnames should be null-terminated, not newline-terminated,
  413. X  so that pathnames that contain newlines are handled properly.
  414. X
  415. X  Add general options so that rcsdiff and rcsmerge can pass arbitrary options
  416. X  to its subsidiary co and diff processes.  E.g.
  417. X
  418. X    -.OPTION to pass OPTION to the subsidiary `co'
  419. X    -/OPTION to pass OPTION to the subsidiary `diff' (for rcsdiff only)
  420. X
  421. X  For example:
  422. X
  423. X    rcsdiff -.-d"1991/02/09 18:09" -.-sRel -/+unified -/-C -/5 -/-d foo.c
  424. X
  425. X  invokes `co -d"1991/02/09 18:09" -sRel ...' and `diff +unified -C 5 -d ...'.
  426. X  To pass an option to just one subsidiary `co', put the -. option
  427. X  after the corresponding -r option.  For example:
  428. X
  429. X    rcsmerge -r1.4 -.-ko -r1.8 -.-kkv foo.c
  430. X
  431. X  passes `-ko' to the first subsidiary `co', and `-kkv' to the second one.
  432. X
  433. X
  434. X  Permit multiple option-pathname pairs, e.g. co -r1.4 a -r1.5 b.
  435. X
  436. X  Add ways to specify the earliest revision, the most recent revision,
  437. X  the earliest or latest revision on a particular branch, and
  438. X  the parent or child of some other revision.
  439. X
  440. X  If a user has multiple locks, perhaps ci should fall back on ci -k's
  441. X  method to figure out which revision to use.
  442. X
  443. X  Symbolic names need not refer to existing branches and revisions.
  444. X  rcs(1)'s BUGS section says this is a bug.  Is it?  If so, it should be fixed.
  445. X
  446. X  Write an rcsck program that repairs corrupted RCS files,
  447. X  much as fsck repairs corrupted file systems.
  448. X
  449. X  Clean up the source code with a consistent indenting style.
  450. X
  451. X  Update the date parser to use the more modern getdate.y by Bellovin,
  452. X  Salz, and Berets, or the even more modern getdate by Moraes.  None of
  453. X  these getdate implementations are as robust as RCS's old warhorse in
  454. X  avoiding problems like arithmetic overflow, so they'll have to be
  455. X  fixed first.
  456. X
  457. X  Break up the code into a library so that it's easier to write new programs
  458. X  that manipulate RCS files, and so that useless code is removed from the
  459. X  existing programs.  For example, the rcs command contains unnecessary
  460. X  keyword substitution baggage, and the merge command can be greatly pruned.
  461. X
  462. X  Make it easier to use your favorite text editor to edit log messages,
  463. X  etc. instead of having to type them in irretrievably at the terminal.
  464. X
  465. The following projects require a change to RCS file format,
  466. and thus must wait until at least RCS version 6.
  467. X
  468. X  Be able to store RCS files in compressed format.
  469. X  Don't bother to use a .Z extension that would exceed file name length limits;
  470. X  just look at the magic number.
  471. X
  472. X  Add locker commentary, e.g. `co -l -m"checkout to fix merge bug" foo'
  473. X  to tell others why you checked out `foo'.
  474. X  Also record the time when the revision was locked,
  475. X  and perhaps the working pathname (if applicable).
  476. X
  477. X  Let the user mark an RCS revision as deleted; checking out such a revision
  478. X  would result in no working file.  Similarly, using `co -d' with a date either
  479. X  before the initial revision or after the file was marked deleted should
  480. X  remove the working file.  For extra credit, extend the notion of `deleted' to
  481. X  include `renamed'.  RCS should support arbitrary combinations of renaming and
  482. X  deletion, e.g. renaming A to B and B to A, checking in new revisions to both
  483. X  files, and then renaming them back.
  484. X
  485. X  Use a better scheme for locking revisions; the current scheme requires
  486. X  changing the RCS file just to lock or unlock a revision.
  487. X  The new scheme should coexist as well as possible with older versions of RCS,
  488. X  and should avoid the rare NFS bugs mentioned in rcsedit.c.
  489. X
  490. X  Add rcs options for changing keyword names, e.g. XConsortium instead of Id.
  491. X
  492. X  Add frozen branches a la SCCS.  In general, be able to emulate all of
  493. X  SCCS, so that an SCCS-to-RCS program can be practical.
  494. X
  495. X  Add support for distributed RCS, where widely separated
  496. X  users cannot easily access each others' RCS files,
  497. X  and must periodically distribute and reconcile new revisions.
  498. X
  499. X  Be able to create empty branches.
  500. X
  501. X  Improve RCS's method for storing binary files.
  502. X  Although it is more efficient than SCCS's,
  503. X  the diff algorithm is still line oriented,
  504. X  and often generates long output for minor changes to an executable file.
  505. X
  506. X  Add a new `-kb' expansion for binary files on non-Posix hosts
  507. X  that distinguish between text and binary I/O.
  508. X  The current `text_work_stdio' compile-time switch is too inflexible.
  509. X  This fix either requires nonstandard primitives like DOS's setmode(),
  510. X  or requires that `-kb' be specified on initial checkin and never changed.
  511. X  From the user's point of view, it would be best if
  512. X  RCS detected and handled binary files without human intervention,
  513. X  switching expansion methods as needed from revision to revision.
  514. X
  515. X  Extend the grammar of RCS files so that keywords need not be in a fixed order.
  516. X
  517. X  Internationalize messages; unfortunately, there's no common standard yet.
  518. X  This requires a change in RCS file format because of the
  519. X  `empty log message' and `checked in with -k' hacks inside RCS files.
  520. X
  521. X
  522. Credits:
  523. X
  524. X  RCS was designed and built by Walter F. Tichy of Purdue University.
  525. X  RCS version 3 was released in 1983.
  526. X
  527. X  Adam Hammer, Thomas Narten, and Dan Trinkle of Purdue supported RCS through
  528. X  version 4.3, released in 1990.  Guy Harris of Sun contributed many porting
  529. X  fixes.  Paul Eggert of System Development Corporation contributed bug fixes
  530. X  and tuneups.  Jay Lepreau contributed 4.3BSD support.
  531. X
  532. X  Paul Eggert of Twin Sun wrote the changes for RCS version 5, released in 1991.
  533. X  Rich Braun of Kronos and Andy Glew of Intel contributed ideas for new options.
  534. X  Bill Hahn of Stratus contributed ideas for setuid support.
  535. X  Ideas for piece tables came from Joe Berkovitz of Stratus and Walter F. Tichy.
  536. X  Matt Cross of Stratus contributed test case ideas.
  537. X  Adam Hammer of Purdue QAed.
  538. END_OF_FILE
  539. if test 17679 -ne `wc -c <'README'`; then
  540.     echo shar: \"'README'\" unpacked with wrong size!
  541. fi
  542. # end of 'README'
  543. fi
  544. if test ! -d 'man' ; then
  545.     echo shar: Creating directory \"'man'\"
  546.     mkdir 'man'
  547. fi
  548. if test -f 'man/Makefile' -a "${1}" != "-c" ; then 
  549.   echo shar: Will not clobber existing file \"'man/Makefile'\"
  550. else
  551. echo shar: Extracting \"'man/Makefile'\" \(603 characters\)
  552. sed "s/^X//" >'man/Makefile' <<'END_OF_FILE'
  553. X# Make RCS man pages.
  554. X
  555. X#    $Id: Makefile,v 5.2 1991/08/19 03:13:55 eggert Exp $
  556. X
  557. MANDIR = /usr/man
  558. X
  559. install = install -c -m 444
  560. X
  561. all clean ::
  562. X
  563. install ::
  564. X    ${install} ci.1 ${DESTDIR}${MANDIR}/man1
  565. X    ${install} co.1 ${DESTDIR}${MANDIR}/man1
  566. X    ${install} ident.1 ${DESTDIR}${MANDIR}/man1
  567. X    ${install} merge.1 ${DESTDIR}${MANDIR}/man1
  568. X    ${install} rcs.1 ${DESTDIR}${MANDIR}/man1
  569. X    ${install} rcsdiff.1 ${DESTDIR}${MANDIR}/man1
  570. X    ${install} rcsintro.1 ${DESTDIR}${MANDIR}/man1
  571. X    ${install} rcsmerge.1 ${DESTDIR}${MANDIR}/man1
  572. X    ${install} rlog.1 ${DESTDIR}${MANDIR}/man1
  573. X    ${install} rcsfile.5 ${DESTDIR}${MANDIR}/man5
  574. END_OF_FILE
  575. if test 603 -ne `wc -c <'man/Makefile'`; then
  576.     echo shar: \"'man/Makefile'\" unpacked with wrong size!
  577. fi
  578. # end of 'man/Makefile'
  579. fi
  580. if test -f 'man/ident.1' -a "${1}" != "-c" ; then 
  581.   echo shar: Will not clobber existing file \"'man/ident.1'\"
  582. else
  583. echo shar: Extracting \"'man/ident.1'\" \(1414 characters\)
  584. sed "s/^X//" >'man/ident.1' <<'END_OF_FILE'
  585. X.de Id
  586. X.ds Rv \\$3
  587. X.ds Dt \\$4
  588. X.ds iD \\$3 \\$4 \\$5 \\$6 \\$7
  589. X..
  590. X.Id $Id: ident.1,v 5.0 1990/08/22 09:09:36 eggert Exp $
  591. X.ds r \s-1RCS\s0
  592. X.if n .ds - \%--
  593. X.if t .ds - \(em
  594. X.TH IDENT 1 \*(Dt GNU
  595. X.SH NAME
  596. ident \- identify files
  597. X.SH SYNOPSIS
  598. X.B ident
  599. X[
  600. X.B \-q
  601. X] [
  602. X.I file
  603. X\&.\|.\|. ]
  604. X.SH DESCRIPTION
  605. X.B ident
  606. searches for all occurrences of the pattern
  607. X.BI $ keyword : .\|.\|. $
  608. in the named files or, if no file name appears, the standard input.
  609. X.PP
  610. These patterns are normally inserted automatically by the \*r command
  611. X.BR co (1),
  612. but can also be inserted manually.
  613. The option
  614. X.B \-q
  615. suppresses
  616. the warning given if there are no patterns in a file.
  617. X.PP
  618. X.B ident
  619. works on text files as well as object files and dumps.
  620. XFor example, if the C program in
  621. X.B f.c
  622. contains
  623. X.IP
  624. X\f3char rcsid[] = \&"$\&Id: f.c,v \*(iD $\&";\fP
  625. X.LP
  626. and
  627. X.B f.c
  628. is compiled into
  629. X.BR f.o ,
  630. then the command
  631. X.IP
  632. X.B "ident  f.c  f.o"
  633. X.LP
  634. will output
  635. X.nf
  636. X.IP
  637. X.ft 3
  638. f.c:
  639. X    $\&Id: f.c,v \*(iD $
  640. f.o:
  641. X    $\&Id: f.c,v \*(iD $
  642. X.ft
  643. X.fi
  644. X.SH IDENTIFICATION
  645. Author: Walter F. Tichy.
  646. X.br
  647. Revision Number: \*(Rv; Release Date: \*(Dt.
  648. X.br
  649. Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
  650. X.br
  651. Copyright \(co 1990 by Paul Eggert.
  652. X.SH "SEE ALSO"
  653. ci(1), co(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1),
  654. rcsfile(5)
  655. X.br
  656. Walter F. Tichy,
  657. X\*r\*-A System for Version Control,
  658. X.I "Software\*-Practice & Experience"
  659. X.BR 15 ,
  660. X7 (July 1985), 637-654.
  661. END_OF_FILE
  662. if test 1414 -ne `wc -c <'man/ident.1'`; then
  663.     echo shar: \"'man/ident.1'\" unpacked with wrong size!
  664. fi
  665. # end of 'man/ident.1'
  666. fi
  667. if test -f 'man/merge.1' -a "${1}" != "-c" ; then 
  668.   echo shar: Will not clobber existing file \"'man/merge.1'\"
  669. else
  670. echo shar: Extracting \"'man/merge.1'\" \(1787 characters\)
  671. sed "s/^X//" >'man/merge.1' <<'END_OF_FILE'
  672. X.de Id
  673. X.ds Rv \\$3
  674. X.ds Dt \\$4
  675. X..
  676. X.Id $Id: merge.1,v 5.3 1991/02/28 19:18:45 eggert Exp $
  677. X.TH MERGE 1 \*(Dt GNU
  678. X.SH NAME
  679. merge \- three-way file merge
  680. X.SH SYNOPSIS
  681. X.B merge
  682. X[
  683. X.B \-L
  684. X.I label1
  685. X[
  686. X.B \-L
  687. X.I label3
  688. X] ] [
  689. X.B \-p
  690. X] [
  691. X.B \-q
  692. X]
  693. X.I "file1 file2 file3"
  694. X.SH DESCRIPTION
  695. X.B merge
  696. incorporates all changes that lead from
  697. X.I file2
  698. to
  699. X.I file3
  700. into
  701. X.IR file1 .
  702. The result goes to standard output if
  703. X.B \-p
  704. is present, into
  705. X.I file1
  706. otherwise.
  707. X.B merge
  708. is useful for combining separate changes to an original.  Suppose
  709. X.I file2
  710. is the original, and both
  711. X.I file1
  712. and
  713. X.I file3
  714. are modifications of
  715. X.IR file2 .
  716. Then
  717. X.B merge
  718. combines both changes.
  719. X.PP
  720. An overlap occurs if both
  721. X.I file1
  722. and
  723. X.I file3
  724. have changes in a common segment of lines.
  725. On a few older hosts where
  726. X.B diff3
  727. does not support the
  728. X.B \-E
  729. option,
  730. X.B merge
  731. does not detect overlaps, and merely supplies the changed lines from
  732. X.I file3.
  733. On most hosts, if overlaps occur,
  734. X.B merge
  735. outputs a message (unless the
  736. X.B \-q
  737. option is given),
  738. and includes both alternatives
  739. in the result.  The alternatives are delimited as follows:
  740. X.LP
  741. X.RS
  742. X.nf
  743. X.BI <<<<<<< " file1"
  744. X.I "lines in file1"
  745. X.B "======="
  746. X.I "lines in file3"
  747. X.BI >>>>>>> " file3"
  748. X.RE
  749. X.fi
  750. X.LP
  751. If there are overlaps, the user should edit the result and delete one of the
  752. alternatives.
  753. If the
  754. X.BI \-L "\ label1"
  755. and
  756. X.BI \-L "\ label3"
  757. options are given, the labels are output in place of the names
  758. X.I file1
  759. and
  760. X.I file3
  761. in overlap reports.
  762. X.SH DIAGNOSTICS
  763. XExit status is 0 for no overlaps, 1 for some overlaps, 2 for trouble.
  764. X.SH IDENTIFICATION
  765. Author: Walter F. Tichy.
  766. X.br
  767. Revision Number: \*(Rv; Release Date: \*(Dt.
  768. X.br
  769. Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
  770. X.br
  771. Copyright \(co 1990, 1991 by Paul Eggert.
  772. X.SH SEE ALSO
  773. diff3(1), diff(1), rcsmerge(1), co(1).
  774. END_OF_FILE
  775. if test 1787 -ne `wc -c <'man/merge.1'`; then
  776.     echo shar: \"'man/merge.1'\" unpacked with wrong size!
  777. fi
  778. # end of 'man/merge.1'
  779. fi
  780. if test -f 'man/rcsclean.1' -a "${1}" != "-c" ; then 
  781.   echo shar: Will not clobber existing file \"'man/rcsclean.1'\"
  782. else
  783. echo shar: Extracting \"'man/rcsclean.1'\" \(3703 characters\)
  784. sed "s/^X//" >'man/rcsclean.1' <<'END_OF_FILE'
  785. X.de Id
  786. X.ds Rv \\$3
  787. X.ds Dt \\$4
  788. X..
  789. X.Id $Id: rcsclean.1,v 1.8 1991/11/03 01:09:19 eggert Exp $
  790. X.ds r \&\s-1RCS\s0
  791. X.if n .ds - \%--
  792. X.if t .ds - \(em
  793. X.TH RCSCLEAN 1 \*(Dt GNU
  794. X.SH NAME
  795. rcsclean \- clean up working files
  796. X.SH SYNOPSIS
  797. X.B rcsclean
  798. X.RI [ options "] [ " file " .\|.\|. ]"
  799. X.SH DESCRIPTION
  800. X.B rcsclean
  801. removes working files that were checked out and never modified.
  802. XFor each
  803. X.I file
  804. given,
  805. X.B rcsclean
  806. compares the working file and a revision in the corresponding
  807. X\*r file.  If it finds a difference, it does nothing.
  808. Otherwise, it first unlocks the revision if the
  809. X.B \-u
  810. option is given,
  811. and then removes the working file
  812. unless the working file is writable and the revision is locked.
  813. It logs its actions by outputting the corresponding
  814. X.B "rcs \-u"
  815. and
  816. X.B "rm \-f"
  817. commands on the standard output.
  818. X.PP
  819. If no
  820. X.I file
  821. is given, all working files in the current directory are cleaned.
  822. Pathnames matching an \*r suffix denote \*r files;
  823. all others denote working files.
  824. Names are paired as explained in
  825. X.BR ci (1).
  826. X.PP
  827. The number of the revision to which the working file is compared
  828. may be attached to any of the options
  829. X.BR \-n ,
  830. X.BR \-q ,
  831. X.BR \-r ,
  832. or
  833. X.BR \-u .
  834. If no revision number is specified, then if the
  835. X.B \-u
  836. option is given and the caller has one revision locked,
  837. X.B rcsclean
  838. uses that revision; otherwise
  839. X.B rcsclean
  840. uses the latest revision on the default branch, normally the root.
  841. X.PP
  842. X.B rcsclean
  843. is useful for
  844. X.B clean
  845. targets in Makefiles.
  846. See also
  847. X.BR rcsdiff (1),
  848. which prints out the differences,
  849. and
  850. X.BR ci (1),
  851. which
  852. normally asks whether to check in a file
  853. if it was not changed.
  854. X.SH OPTIONS
  855. X.TP
  856. X.BI \-k subst
  857. Use
  858. X.I subst
  859. style keyword substitution when retrieving the revision for comparison.
  860. See
  861. X.BR co (1)
  862. for details.
  863. X.TP
  864. X.BR \-n [\f2rev\fP]
  865. Do not actually remove any files or unlock any revisions.
  866. Using this option will tell you what
  867. X.B rcsclean
  868. would do without actually doing it.
  869. X.TP
  870. X.BR \-q [\f2rev\fP]
  871. Do not log the actions taken on standard output.
  872. X.TP
  873. X.BR \-r [\f2rev\fP]
  874. This option has no effect other than specifying the revision for comparison.
  875. X.TP
  876. X.BR \-u [\f2rev\fP]
  877. Unlock the revision if it is locked and no difference is found.
  878. X.TP
  879. X.BI \-V n
  880. XEmulate \*r version
  881. X.IR n .
  882. See
  883. X.BR co (1)
  884. for details.
  885. X.TP
  886. X.BI \-x "suffixes"
  887. Use
  888. X.I suffixes
  889. to characterize \*r files.
  890. See
  891. X.BR ci (1)
  892. for details.
  893. X.SH EXAMPLES
  894. X.LP
  895. X.RS
  896. X.ft 3
  897. rcsclean  *.c  *.h
  898. X.ft
  899. X.RE
  900. X.LP
  901. removes all working files ending in
  902. X.B .c
  903. or
  904. X.B .h
  905. that were not changed
  906. since their checkout.
  907. X.LP
  908. X.RS
  909. X.ft 3
  910. rcsclean
  911. X.ft
  912. X.RE
  913. X.LP
  914. removes all working files in the current directory
  915. that were not changed since their checkout.
  916. X.SH FILES
  917. X.B rcsclean
  918. accesses files much as
  919. X.BR ci (1)
  920. does.
  921. X.SH ENVIRONMENT
  922. X.TP
  923. X.B \s-1RCSINIT\s0
  924. options prepended to the argument list, separated by spaces.
  925. A backslash escapes spaces within an option.
  926. The
  927. X.B \s-1RCSINIT\s0
  928. options are prepended to the argument lists of most \*r commands.
  929. Useful
  930. X.B \s-1RCSINIT\s0
  931. options include
  932. X.BR \-q ,
  933. X.BR \-V ,
  934. and
  935. X.BR \-x .
  936. X.SH DIAGNOSTICS
  937. The exit status is zero if and only if all operations were successful.
  938. Missing working files and \*r files are silently ignored.
  939. X.SH IDENTIFICATION
  940. Author: Walter F. Tichy.
  941. X.br
  942. Revision Number: \*(Rv; Release Date: \*(Dt.
  943. X.br
  944. Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
  945. X.br
  946. Copyright \(co 1990, 1991 by Paul Eggert.
  947. X.SH "SEE ALSO"
  948. ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1),
  949. rcsfile(5)
  950. X.br
  951. Walter F. Tichy,
  952. X\*r\*-A System for Version Control,
  953. X.I "Software\*-Practice & Experience"
  954. X.BR 15 ,
  955. X7 (July 1985), 637-654.
  956. X.SH BUGS
  957. At least one
  958. X.I file
  959. must be given in older Unix versions that
  960. do not provide the needed directory scanning operations.
  961. X.br
  962. END_OF_FILE
  963. if test 3703 -ne `wc -c <'man/rcsclean.1'`; then
  964.     echo shar: \"'man/rcsclean.1'\" unpacked with wrong size!
  965. fi
  966. # end of 'man/rcsclean.1'
  967. fi
  968. if test -f 'man/rcsdiff.1' -a "${1}" != "-c" ; then 
  969.   echo shar: Will not clobber existing file \"'man/rcsdiff.1'\"
  970. else
  971. echo shar: Extracting \"'man/rcsdiff.1'\" \(2809 characters\)
  972. sed "s/^X//" >'man/rcsdiff.1' <<'END_OF_FILE'
  973. X.de Id
  974. X.ds Rv \\$3
  975. X.ds Dt \\$4
  976. X..
  977. X.Id $Id: rcsdiff.1,v 5.3 1991/04/21 12:00:46 eggert Exp $
  978. X.ds r \&\s-1RCS\s0
  979. X.if n .ds - \%--
  980. X.if t .ds - \(em
  981. X.TH RCSDIFF 1 \*(Dt GNU
  982. X.SH NAME
  983. rcsdiff \- compare RCS revisions
  984. X.SH SYNOPSIS
  985. X.B rcsdiff
  986. X[
  987. X.BI \-k subst
  988. X] [
  989. X.B \-q
  990. X] [
  991. X.BI \-r rev1
  992. X[
  993. X.BI \-r rev2
  994. X] ] [
  995. X.BI \-V n
  996. X] [
  997. X.BI \-x suffixes
  998. X] [
  999. X.I "diff options"
  1000. X]
  1001. X.I "file .\|.\|."
  1002. X.SH DESCRIPTION
  1003. X.B rcsdiff
  1004. runs
  1005. X.BR diff (1)
  1006. to compare two revisions of each \*r file given.
  1007. X.PP
  1008. Pathnames matching an \*r suffix denote \*r files;
  1009. all others denote working files.
  1010. Names are paired as explained in
  1011. X.BR ci (1).
  1012. X.PP
  1013. The option
  1014. X.B \-q
  1015. suppresses diagnostic output.
  1016. Zero, one, or two revisions may be specified with
  1017. X.BR \-r .
  1018. The option
  1019. X.BI \-k subst
  1020. affects keyword substitution when extracting
  1021. revisions, as described in
  1022. X.BR co (1);
  1023. for example,
  1024. X.B "\-kk\ \-r1.1\ \-r1.2"
  1025. ignores differences in keyword values when comparing revisions
  1026. X.B 1.1
  1027. and
  1028. X.BR 1.2 .
  1029. To avoid excess output from locker name substitution,
  1030. X.B \-kkvl
  1031. is assumed if (1) at most one revision option is given,
  1032. X(2) no
  1033. X.B \-k
  1034. option is given, (3)
  1035. X.B \-kkv
  1036. is the default keyword substitution, and
  1037. X(4) the working file's mode would be produced by
  1038. X.BR "co\ \-l".
  1039. See
  1040. X.BR co (1)
  1041. for details
  1042. about
  1043. X.B \-V
  1044. and
  1045. X.BR \-x .
  1046. Otherwise, all options of
  1047. X.BR diff (1)
  1048. that apply to regular files are accepted, with the same meaning as for
  1049. X.BR diff .
  1050. X.PP
  1051. If both
  1052. X.I rev1
  1053. and
  1054. X.I rev2
  1055. are omitted,
  1056. X.B rcsdiff
  1057. compares the latest revision on the
  1058. default branch (by default the trunk)
  1059. with the contents of the corresponding working file.  This is useful
  1060. for determining what you changed since the last checkin.
  1061. X.PP
  1062. If
  1063. X.I rev1
  1064. is given, but
  1065. X.I rev2
  1066. is omitted,
  1067. X.B rcsdiff
  1068. compares revision
  1069. X.I rev1
  1070. of the \*r file with
  1071. the contents of the corresponding working file.
  1072. X.PP
  1073. If both
  1074. X.I rev1
  1075. and
  1076. X.I rev2
  1077. are given,
  1078. X.B rcsdiff
  1079. compares revisions
  1080. X.I rev1
  1081. and
  1082. X.I rev2
  1083. of the \*r file.
  1084. X.PP
  1085. Both
  1086. X.I rev1
  1087. and
  1088. X.I rev2
  1089. may be given numerically or symbolically.
  1090. X.SH EXAMPLE
  1091. The command
  1092. X.LP
  1093. X.B "        rcsdiff  f.c"
  1094. X.LP
  1095. compares the latest revision on the default branch of the \*r file
  1096. to the contents of the working file
  1097. X.BR f.c .
  1098. X.SH ENVIRONMENT
  1099. X.TP
  1100. X.B \s-1RCSINIT\s0
  1101. options prepended to the argument list, separated by spaces.
  1102. See
  1103. X.BR ci (1)
  1104. for details.
  1105. X.SH DIAGNOSTICS
  1106. XExit status is 0 for no differences during any comparison,
  1107. X1 for some differences, 2 for trouble.
  1108. X.SH IDENTIFICATION
  1109. Author: Walter F. Tichy.
  1110. X.br
  1111. Revision Number: \*(Rv; Release Date: \*(Dt.
  1112. X.br
  1113. Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
  1114. X.br
  1115. Copyright \(co 1990, 1991 by Paul Eggert.
  1116. X.SH "SEE ALSO"
  1117. ci(1), co(1), diff(1), ident(1), rcs(1), rcsintro(1), rcsmerge(1), rlog(1)
  1118. X.br
  1119. Walter F. Tichy,
  1120. X\*r\*-A System for Version Control,
  1121. X.I "Software\*-Practice & Experience"
  1122. X.BR 15 ,
  1123. X7 (July 1985), 637-654.
  1124. X.br
  1125. END_OF_FILE
  1126. if test 2809 -ne `wc -c <'man/rcsdiff.1'`; then
  1127.     echo shar: \"'man/rcsdiff.1'\" unpacked with wrong size!
  1128. fi
  1129. # end of 'man/rcsdiff.1'
  1130. fi
  1131. if test -f 'man/rcsfile.5' -a "${1}" != "-c" ; then 
  1132.   echo shar: Will not clobber existing file \"'man/rcsfile.5'\"
  1133. else
  1134. echo shar: Extracting \"'man/rcsfile.5'\" \(6267 characters\)
  1135. sed "s/^X//" >'man/rcsfile.5' <<'END_OF_FILE'
  1136. X.de Id
  1137. X.ds Rv \\$3
  1138. X.ds Dt \\$4
  1139. X..
  1140. X.Id $Id: rcsfile.5,v 5.1 1991/08/19 03:13:55 eggert Exp $
  1141. X.ds r \s-1RCS\s0
  1142. X.if n .ds - \%--
  1143. X.if t .ds - \(em
  1144. X.TH RCSFILE 5 \*(Dt GNU
  1145. X.SH NAME
  1146. rcsfile \- format of RCS file
  1147. X.SH DESCRIPTION
  1148. An \*r file's
  1149. contents are described by the grammar
  1150. below.
  1151. X.PP
  1152. The text is free format: space, backspace, tab, newline, vertical
  1153. tab, form feed, and carriage return (collectively,
  1154. X.IR "white space")
  1155. have no significance except in strings.
  1156. However, an \*r file must end in a newline character.
  1157. X.PP
  1158. Strings are enclosed by
  1159. X.BR @ .
  1160. If a string contains a
  1161. X.BR @ ,
  1162. it must be doubled;
  1163. otherwise, strings may contain arbitrary binary data.
  1164. X.PP
  1165. The meta syntax uses the following conventions: `|' (bar) separates
  1166. alternatives; `{' and `}' enclose optional phrases; `{' and `}*' enclose
  1167. phrases that may be repeated zero or more times;
  1168. X`{' and '}+' enclose phrases that must appear at least once and may be
  1169. repeated;
  1170. Terminal symbols are in
  1171. X.BR boldface ;
  1172. nonterminal symbols are in
  1173. X.IR italics .
  1174. X.LP
  1175. X.nr x \w'\f3branches\fP'
  1176. X.nr y \w'{ \f3comment\fP'
  1177. X.if \nx<\ny .nr x \ny
  1178. X.nr y \w'\f3{ branch\fP'
  1179. X.if \nx<\ny .nr x \ny
  1180. X.ta \w'\f2deltatext\fP  'u +\w'::=  'u +\nxu+\w'  'u
  1181. X.fc ~
  1182. X.nf
  1183. X\f2rcstext\fP    ::=    \f2admin\fP {\f2delta\fP}* \f2desc\fP {\f2deltatext\fP}*
  1184. X.LP
  1185. X\f2admin\fP    ::=    \f3head\fP    {\f2num\fP}\f3;\fP
  1186. X        { \f3branch\fP    {\f2num\fP}\f3;\fP }
  1187. X        \f3access\fP    {\f2id\fP}*\f3;\fP
  1188. X        \f3symbols\fP    {\f2id\fP \f3:\fP \f2num\fP}*\f3;\fP
  1189. X        \f3locks\fP    {\f2id\fP \f3:\fP \f2num\fP}*\f3;\fP  {\f3strict  ;\fP}
  1190. X        { \f3comment\fP    {\f2string\fP}\f3;\fP }
  1191. X        { \f3expand\fP    {\f2string\fP}\f3;\fP }
  1192. X        { \f2newphrase\fP }*
  1193. X.LP
  1194. X\f2delta\fP    ::=    \f2num\fP
  1195. X        \f3date\fP    \f2num\fP\f3;\fP
  1196. X        \f3author\fP    \f2id\fP\f3;\fP
  1197. X        \f3state\fP    {\f2id\fP}\f3;\fP
  1198. X        \f3branches\fP    {\f2num\fP}*\f3;\fP
  1199. X        \f3next\fP    {\f2num\fP}\f3;\fP
  1200. X        { \f2newphrase\fP }*
  1201. X.LP
  1202. X\f2desc\fP    ::=    \f3desc\fP    \f2string\fP
  1203. X.LP
  1204. X\f2deltatext\fP    ::=    \f2num\fP
  1205. X        \f3log\fP    \f2string\fP
  1206. X        { \f2newphrase\fP }*
  1207. X        \f3text\fP    \f2string\fP
  1208. X.LP
  1209. X\f2num\fP    ::=    {\f2digit\fP{\f3.\fP}}+
  1210. X.LP
  1211. X\f2digit\fP    ::=    \f30\fP | \f31\fP | .\|.\|. | \f39\fP
  1212. X.LP
  1213. X\f2id\fP    ::=    \f2letter\fP{\f2idchar\fP}*
  1214. X.LP
  1215. X\f2letter\fP    ::=    any letter
  1216. X.LP
  1217. X\f2idchar\fP    ::=    any visible graphic character except \f2special\fP
  1218. X.LP
  1219. X\f2special\fP    ::=    \f3$\fP | \f3,\fP | \f3.\fP | \f3:\fP | \f3;\fP | \f3@\fP
  1220. X.LP
  1221. X\f2string\fP    ::=    \f3@\fP{any character, with \f3@\fP doubled}*\f3@\fP
  1222. X.LP
  1223. X\f2newphrase\fP    ::=    \f2id\fP \f2word\fP* \f3;\fP
  1224. X.LP
  1225. X\f2word\fP    ::=    \f2id\fP | \f2num\fP | \f2string\fP | \f3:\fP
  1226. X.fi
  1227. X.PP
  1228. Identifiers are case sensitive.  Keywords are in lower case only.
  1229. The sets of keywords and identifiers may overlap.
  1230. In most environments RCS uses the ISO 8859/1 encoding:
  1231. letters are octal codes 101\-132, 141\-172, 300\-326, 330\-366 and 370-377,
  1232. visible graphic characters are codes 041\-176 and 240\-377,
  1233. and white space characters are codes 010\-015 and 040.
  1234. X.PP
  1235. The
  1236. X.I newphrase
  1237. productions in the grammar are reserved for future extensions
  1238. to the format of \*r files.
  1239. No
  1240. X.I newphrase
  1241. will begin with any keyword already in use.
  1242. X.PP
  1243. The
  1244. X.I delta
  1245. nodes form a tree.  All nodes whose numbers
  1246. consist of a single pair
  1247. X(e.g., 2.3, 2.1, 1.3, etc.)
  1248. are on the trunk, and are linked through the
  1249. X.B next
  1250. field in order of decreasing numbers.
  1251. The
  1252. X.B head
  1253. field in the
  1254. X.I admin
  1255. node points to the head of that sequence (i.e., contains
  1256. the highest pair).
  1257. The
  1258. X.B branch
  1259. node in the admin node indicates the default
  1260. branch (or revision) for most \*r operations.
  1261. If empty, the default
  1262. branch is the highest branch on the trunk.
  1263. X.PP
  1264. All
  1265. X.I delta
  1266. nodes whose numbers consist of
  1267. X.RI 2 n
  1268. fields
  1269. X.RI ( n \(\fP=2)
  1270. X(e.g., 3.1.1.1, 2.1.2.2, etc.)
  1271. are linked as follows.
  1272. All nodes whose first
  1273. X.RI 2 n \-1
  1274. number fields are identical are linked through the
  1275. X.B next
  1276. field in order of increasing numbers.
  1277. XFor each such sequence,
  1278. the
  1279. X.I delta
  1280. node whose number is identical to the first
  1281. X.RI 2 n \-2
  1282. number fields of the deltas on that sequence is called the branchpoint.
  1283. The
  1284. X.B branches
  1285. field of a node contains a list of the
  1286. numbers of the first nodes of all sequences for which it is a branchpoint.
  1287. This list is ordered in increasing numbers.
  1288. X.LP
  1289. X.nf
  1290. X.vs 12
  1291. X.ne 38
  1292. XExample:
  1293. X.if t .in +0.5i
  1294. X.cs 1 20
  1295. X.eo
  1296. X
  1297. X                           Head
  1298. X                             |
  1299. X                             |
  1300. X                             v                        / \
  1301. X                         ---------                   /   \
  1302. X   / \          / \      |       |      / \         /     \
  1303. X  /   \        /   \     |  2.1  |     /   \       /       \
  1304. X /     \      /     \    |       |    /     \     /         \
  1305. X/1.2.1.3\    /1.3.1.1\   |       |   /1.2.2.2\   /1.2.2.1.1.1\
  1306. X---------    ---------   ---------   ---------   -------------
  1307. X    ^            ^           |           ^             ^
  1308. X    |            |           |           |             |
  1309. X    |            |           v           |             |
  1310. X   / \           |       ---------      / \            |
  1311. X  /   \          |       \  1.3  /     /   \           |
  1312. X /     \         ---------\     /     /     \-----------
  1313. X/1.2.1.1\                  \   /     /1.2.2.1\
  1314. X---------                   \ /      ---------
  1315. X    ^                        |           ^
  1316. X    |                        |           |
  1317. X    |                        v           |
  1318. X    |                    ---------       |
  1319. X    |                    \  1.2  /       |
  1320. X    ----------------------\     /---------
  1321. X                           \   /
  1322. X                            \ /
  1323. X                             |
  1324. X                             |
  1325. X                             v
  1326. X                         ---------
  1327. X                         \  1.1  /
  1328. X                          \     /
  1329. X                           \   /
  1330. X                            \ /
  1331. X
  1332. X.ec
  1333. X.if t .in
  1334. X.cs 1
  1335. X.ce
  1336. XFig. 1: A revision tree
  1337. X.vs
  1338. X.fi
  1339. X.PP
  1340. X.SH IDENTIFICATION
  1341. X.de VL
  1342. X\\$2
  1343. X..
  1344. Author: Walter F. Tichy,
  1345. Purdue University, West Lafayette, IN, 47907.
  1346. X.br
  1347. Revision Number: \*(Rv; Release Date: \*(Dt.
  1348. X.br
  1349. Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
  1350. X.br
  1351. Copyright \(co 1990, 1991 by Paul Eggert.
  1352. X.SH SEE ALSO
  1353. ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsmerge(1), rlog(1),
  1354. X.br
  1355. Walter F. Tichy,
  1356. X\*r\*-A System for Version Control,
  1357. X.I "Software\*-Practice & Experience"
  1358. X.BR 15 ,
  1359. X7 (July 1985), 637-654.
  1360. END_OF_FILE
  1361. if test 6267 -ne `wc -c <'man/rcsfile.5'`; then
  1362.     echo shar: \"'man/rcsfile.5'\" unpacked with wrong size!
  1363. fi
  1364. # end of 'man/rcsfile.5'
  1365. fi
  1366. if test -f 'man/rcsfreeze.1' -a "${1}" != "-c" ; then 
  1367.   echo shar: Will not clobber existing file \"'man/rcsfreeze.1'\"
  1368. else
  1369. echo shar: Extracting \"'man/rcsfreeze.1'\" \(1723 characters\)
  1370. sed "s/^X//" >'man/rcsfreeze.1' <<'END_OF_FILE'
  1371. X.de Id
  1372. X.ds Rv \\$3
  1373. X.ds Dt \\$4
  1374. X..
  1375. X.Id $Id: rcsfreeze.1,v 4.4 1990/11/13 15:43:42 hammer Exp $
  1376. X.ds r \s-1RCS\s0
  1377. X.TH RCSFREEZE 1 \*(Dt GNU
  1378. X.SH NAME
  1379. rcsfreeze \- freeze a configuration of sources checked in under RCS
  1380. X.SH SYNOPSIS
  1381. X.B rcsfreeze
  1382. X.RI [ "name" ]
  1383. X.SH DESCRIPTION
  1384. X.B rcsfreeze
  1385. assigns a symbolic revision
  1386. number to a set of \*r files that form a valid configuration.
  1387. X.PP
  1388. The idea is to run
  1389. X.B rcsfreeze
  1390. each time a new version is checked
  1391. in.  A unique symbolic name (\c
  1392. X.BI C_ number,
  1393. where
  1394. X.I number
  1395. is increased each time
  1396. X.B rcsfreeze
  1397. is run) is then assigned to the most
  1398. recent revision of each \*r file of the main trunk.
  1399. X.PP
  1400. An optional
  1401. X.I name
  1402. argument to
  1403. X.B rcsfreeze
  1404. gives a symbolic name to the configuration.
  1405. The unique identifier is still generated
  1406. and is listed in the log file but it will not appear as
  1407. part of the symbolic revision name in the actual \*r files.
  1408. X.PP
  1409. A log message is requested from the user for future reference.
  1410. X.PP
  1411. The shell script works only on all \*r files at one time.
  1412. All changed files must be checked in already.
  1413. Run
  1414. X.IR rcsclean (1)
  1415. first and see whether any sources remain in the current directory.
  1416. X.SH FILES
  1417. X.TP
  1418. X.B RCS/.rcsfreeze.ver
  1419. version number
  1420. X.TP
  1421. X.B RCS/.rcsfreeze.log
  1422. log messages, most recent first
  1423. X.SH AUTHOR
  1424. Stephan v. Bechtolsheim
  1425. X.SH "SEE ALSO"
  1426. co(1), rcs(1), rcsclean(1), rlog(1)
  1427. X.SH BUGS
  1428. X.B rcsfreeze
  1429. does not check whether any sources are checked out and modified.
  1430. X.PP
  1431. Although both source file names and RCS file names are accepted,
  1432. they are not paired as usual with RCS commands.
  1433. X.PP
  1434. XError checking is rudimentary.
  1435. X.PP
  1436. X.B rcsfreeze
  1437. is just an optional example shell script, and should not be taken too seriously.
  1438. See \s-1CVS\s0 for a more complete solution.
  1439. END_OF_FILE
  1440. if test 1723 -ne `wc -c <'man/rcsfreeze.1'`; then
  1441.     echo shar: \"'man/rcsfreeze.1'\" unpacked with wrong size!
  1442. fi
  1443. # end of 'man/rcsfreeze.1'
  1444. fi
  1445. if test -f 'man/rcsmerge.1' -a "${1}" != "-c" ; then 
  1446.   echo shar: Will not clobber existing file \"'man/rcsmerge.1'\"
  1447. else
  1448. echo shar: Extracting \"'man/rcsmerge.1'\" \(3305 characters\)
  1449. sed "s/^X//" >'man/rcsmerge.1' <<'END_OF_FILE'
  1450. X.de Id
  1451. X.ds Rv \\$3
  1452. X.ds Dt \\$4
  1453. X..
  1454. X.Id $Id: rcsmerge.1,v 5.3 1991/08/19 03:13:55 eggert Exp $
  1455. X.ds r \&\s-1RCS\s0
  1456. X.if n .ds - \%--
  1457. X.if t .ds - \(em
  1458. X.TH RCSMERGE 1 \*(Dt GNU
  1459. X.SH NAME
  1460. rcsmerge \- merge RCS revisions
  1461. X.SH SYNOPSIS
  1462. X.B rcsmerge
  1463. X.RI [ options ] " file"
  1464. X.SH DESCRIPTION
  1465. X.B rcsmerge
  1466. incorporates the changes between two revisions
  1467. of an \*r file into the corresponding working file.
  1468. X.PP
  1469. Pathnames matching an \*r suffix denote \*r files;
  1470. all others denote working files.
  1471. Names are paired as explained in
  1472. X.BR ci (1).
  1473. X.PP
  1474. At least one revision must be specified with one of the options
  1475. described below, usually
  1476. X.BR \-r .
  1477. At most two revisions may be specified.
  1478. If only one revision is specified, the latest
  1479. revision on the default branch (normally the highest branch on the trunk)
  1480. is assumed for the second revision.
  1481. Revisions may be specified numerically or symbolically.
  1482. X.PP
  1483. X.B rcsmerge
  1484. prints a warning if there are overlaps, and delimits
  1485. the overlapping regions as explained in
  1486. X.BR merge (1).
  1487. The command is useful for incorporating changes into a checked-out revision.
  1488. X.SH OPTIONS
  1489. X.TP
  1490. X.BI \-k subst
  1491. Use
  1492. X.I subst
  1493. style keyword substitution.
  1494. See
  1495. X.BR co (1)
  1496. for details.
  1497. XFor example,
  1498. X.B "\-kk\ \-r1.1\ \-r1.2"
  1499. ignores differences in keyword values when merging the changes from
  1500. X.B 1.1
  1501. to
  1502. X.BR 1.2 .
  1503. X.TP
  1504. X.BR \-p [\f2rev\fP]
  1505. Send the result to standard output instead of overwriting the working file.
  1506. X.TP
  1507. X.BR \-q [\f2rev\fP]
  1508. Run quietly; do not print diagnostics.
  1509. X.TP
  1510. X.BR \-r [\f2rev\fP]
  1511. Merge with respect to revision
  1512. X.IR rev .
  1513. Here an empty
  1514. X.I rev
  1515. stands for the latest revision on the default branch, normally the head.
  1516. X.TP
  1517. X.BI \-V n
  1518. XEmulate \*r version
  1519. X.IR n .
  1520. See
  1521. X.BR co (1)
  1522. for details.
  1523. X.TP
  1524. X.BI \-x "suffixes"
  1525. Use
  1526. X.I suffixes
  1527. to characterize \*r files.
  1528. See
  1529. X.BR ci (1)
  1530. for details.
  1531. X.SH EXAMPLES
  1532. Suppose you have released revision 2.8 of
  1533. X.BR f.c .
  1534. Assume
  1535. furthermore that after you complete an unreleased revision 3.4, you receive
  1536. updates to release 2.8 from someone else.
  1537. To combine the updates to 2.8 and your changes between 2.8 and 3.4,
  1538. put the updates to 2.8 into file f.c and execute
  1539. X.LP
  1540. X.B "    rcsmerge  \-p  \-r2.8  \-r3.4  f.c  >f.merged.c"
  1541. X.PP
  1542. Then examine
  1543. X.BR f.merged.c .
  1544. Alternatively, if you want to save the updates to 2.8 in the \*r file,
  1545. check them in as revision 2.8.1.1 and execute
  1546. X.BR "co \-j":
  1547. X.LP
  1548. X.B "    ci  \-r2.8.1.1  f.c"
  1549. X.br
  1550. X.B "    co  \-r3.4  \-j2.8:2.8.1.1  f.c"
  1551. X.PP
  1552. As another example, the following command undoes the changes
  1553. between revision 2.4 and 2.8 in your currently checked out revision
  1554. in
  1555. X.BR f.c .
  1556. X.LP
  1557. X.B "    rcsmerge  \-r2.8  \-r2.4  f.c"
  1558. X.PP
  1559. Note the order of the arguments, and that
  1560. X.B f.c
  1561. will be
  1562. overwritten.
  1563. X.SH ENVIRONMENT
  1564. X.TP
  1565. X.B \s-1RCSINIT\s0
  1566. options prepended to the argument list, separated by spaces.
  1567. See
  1568. X.BR ci (1)
  1569. for details.
  1570. X.SH DIAGNOSTICS
  1571. XExit status is 0 for no overlaps, 1 for some overlaps, 2 for trouble.
  1572. X.SH IDENTIFICATION
  1573. Author: Walter F. Tichy.
  1574. X.br
  1575. Revision Number: \*(Rv; Release Date: \*(Dt.
  1576. X.br
  1577. Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
  1578. X.br
  1579. Copyright \(co 1990, 1991 by Paul Eggert.
  1580. X.SH "SEE ALSO"
  1581. ci(1), co(1), ident(1), merge(1), rcs(1), rcsdiff(1), rcsintro(1), rlog(1),
  1582. rcsfile(5)
  1583. X.br
  1584. Walter F. Tichy,
  1585. X\*r\*-A System for Version Control,
  1586. X.I "Software\*-Practice & Experience"
  1587. X.BR 15 ,
  1588. X7 (July 1985), 637-654.
  1589. X.br
  1590. END_OF_FILE
  1591. if test 3305 -ne `wc -c <'man/rcsmerge.1'`; then
  1592.     echo shar: \"'man/rcsmerge.1'\" unpacked with wrong size!
  1593. fi
  1594. # end of 'man/rcsmerge.1'
  1595. fi
  1596. if test -f 'man/rlog.1' -a "${1}" != "-c" ; then 
  1597.   echo shar: Will not clobber existing file \"'man/rlog.1'\"
  1598. else
  1599. echo shar: Extracting \"'man/rlog.1'\" \(5697 characters\)
  1600. sed "s/^X//" >'man/rlog.1' <<'END_OF_FILE'
  1601. X.de Id
  1602. X.ds Rv \\$3
  1603. X.ds Dt \\$4
  1604. X..
  1605. X.Id $Id: rlog.1,v 5.3 1991/08/22 06:50:48 eggert Exp $
  1606. X.ds g \&\s-1UTC\s0
  1607. X.ds r \&\s-1RCS\s0
  1608. X.if n .ds - \%--
  1609. X.if t .ds - \(em
  1610. X.TH RLOG 1 \*(Dt GNU
  1611. X.SH NAME
  1612. rlog \- print log messages and other information about RCS files
  1613. X.SH SYNOPSIS
  1614. X.B rlog
  1615. X.RI [ " options " ] " file " .\|.\|.
  1616. X.SH DESCRIPTION
  1617. X.B rlog
  1618. prints information about \*r files.
  1619. X.PP
  1620. Pathnames matching an \*r suffix denote \*r files;
  1621. all others denote working files.
  1622. Names are paired as explained in
  1623. X.BR ci (1).
  1624. X.PP
  1625. X.B rlog
  1626. prints the following information for each
  1627. X\*r file: \*r pathname, working pathname, head (i.e., the number
  1628. of the latest revision on the trunk), default branch, access list, locks,
  1629. symbolic names, suffix, total number of revisions,
  1630. number of revisions selected for printing, and
  1631. descriptive text.  This is followed by entries for the selected revisions in
  1632. reverse chronological order for each branch.  For each revision,
  1633. X.B rlog
  1634. prints revision number, author, date/time, state, number of
  1635. lines added/deleted (with respect to the previous revision),
  1636. locker of the revision (if any), and log message.
  1637. All times are displayed in Coordinated Universal Time (\*g).
  1638. Without options,
  1639. X.B rlog
  1640. prints complete information.
  1641. The options below restrict this output.
  1642. X.nr n \w'\f3\-V\fP\f2n\fP '+1n-1/1n
  1643. X.TP \nn
  1644. X.B \-L
  1645. Ignore \*r files that have no locks set.
  1646. This is convenient in combination with
  1647. X.BR \-h ,
  1648. X.BR \-l ,
  1649. and
  1650. X.BR \-R .
  1651. X.TP
  1652. X.B \-R
  1653. Print only the name of the \*r file.
  1654. This is convenient for translating a
  1655. working pathname into an \*r pathname.
  1656. X.TP
  1657. X.B \-h
  1658. Print only the \*r pathname, working pathname, head,
  1659. default branch, access list, locks,
  1660. symbolic names, and suffix.
  1661. X.TP
  1662. X.B \-t
  1663. Print the same as
  1664. X.BR \-h ,
  1665. plus the descriptive text.
  1666. X.TP
  1667. X.B \-b
  1668. Print information about the revisions on the default branch, normally
  1669. the highest branch on the trunk.
  1670. X.TP
  1671. X.BI \-d "dates"
  1672. Print information about revisions with a checkin date/time in the ranges given by
  1673. the semicolon-separated list of
  1674. X.IR dates .
  1675. A range of the form
  1676. X.IB d1 < d2
  1677. or
  1678. X.IB d2 > d1
  1679. selects the revisions that were deposited between
  1680. X.I d1
  1681. and
  1682. X.I d2
  1683. inclusive.
  1684. A range of the form
  1685. X.BI < d
  1686. or
  1687. X.IB d >
  1688. selects
  1689. all revisions dated
  1690. X.I d
  1691. or earlier.
  1692. A range of the form
  1693. X.IB d <
  1694. or
  1695. X.BI > d
  1696. selects
  1697. all revisions dated
  1698. X.I d
  1699. or later.
  1700. A range of the form
  1701. X.I d
  1702. selects the single, latest revision dated
  1703. X.I d
  1704. or earlier.
  1705. The date/time strings
  1706. X.IR d ,
  1707. X.IR d1 ,
  1708. and
  1709. X.I d2
  1710. are in the free format explained in
  1711. X.BR co (1).
  1712. Quoting is normally necessary, especially for
  1713. X.B <
  1714. and
  1715. X.BR > .
  1716. Note that the separator is
  1717. a semicolon.
  1718. X.TP
  1719. X.BR \-l [\f2lockers\fP]
  1720. Print information about locked revisions only.
  1721. In addition, if the comma-separated list
  1722. X.I lockers
  1723. of login names is given,
  1724. ignore all locks other than those held by the
  1725. X.IR lockers .
  1726. XFor example,
  1727. X.B "rlog\ \-L\ \-R\ \-lwft\ RCS/*"
  1728. prints the name of \*r files locked by the user
  1729. X.BR wft .
  1730. X.TP
  1731. X.BR \-r [\f2revisions\fP]
  1732. prints information about revisions given in the comma-separated list
  1733. X.I revisions
  1734. of revisions and ranges.
  1735. A range
  1736. X.IB rev1 : rev2
  1737. means revisions
  1738. X.I rev1
  1739. to
  1740. X.I rev2
  1741. on the same branch,
  1742. X.BI : rev
  1743. means revisions from the beginning of the branch up to and including
  1744. X.IR rev ,
  1745. and
  1746. X.IB rev :
  1747. means revisions starting with
  1748. X.I rev
  1749. to the end of the branch containing
  1750. X.IR rev .
  1751. An argument that is a branch means all
  1752. revisions on that branch.
  1753. A range of branches means all revisions
  1754. on the branches in that range.
  1755. A branch followed by a
  1756. X.B .\&
  1757. means the latest revision in that branch.
  1758. A bare
  1759. X.B \-r
  1760. with no
  1761. X.I revisions
  1762. means the latest revision on the default branch, normally the trunk.
  1763. X.TP
  1764. X.BI \-s states
  1765. prints information about revisions whose state attributes match one of the
  1766. states given in the comma-separated list
  1767. X.IR states .
  1768. X.TP
  1769. X.BR \-w [\f2logins\fP]
  1770. prints information about revisions checked in by users with
  1771. login names appearing in the comma-separated list
  1772. X.IR logins .
  1773. If
  1774. X.I logins
  1775. is omitted, the user's login is assumed.
  1776. X.TP
  1777. X.BI \-V n
  1778. XEmulate \*r version
  1779. X.I n
  1780. when generating logs.
  1781. See
  1782. X.BR co (1)
  1783. for more.
  1784. X.TP
  1785. X.BI \-x "suffixes"
  1786. Use
  1787. X.I suffixes
  1788. to characterize \*r files.
  1789. See
  1790. X.BR ci (1)
  1791. for details.
  1792. X.PP
  1793. X.B rlog
  1794. prints the intersection of the revisions selected with
  1795. the options
  1796. X.BR \-d ,
  1797. X.BR \-l ,
  1798. X.BR \-s ,
  1799. and
  1800. X.BR \-w ,
  1801. intersected
  1802. with the union of the revisions selected by
  1803. X.B \-b
  1804. and
  1805. X.BR \-r .
  1806. X.SH EXAMPLES
  1807. X.LP
  1808. X.nf
  1809. X.B "    rlog  \-L  \-R  RCS/*"
  1810. X.B "    rlog  \-L  \-h  RCS/*"
  1811. X.B "    rlog  \-L  \-l  RCS/*"
  1812. X.B "    rlog  RCS/*"
  1813. X.fi
  1814. X.LP
  1815. The first command prints the names of all \*r files in the subdirectory
  1816. X.B RCS
  1817. that have locks.  The second command prints the headers of those files,
  1818. and the third prints the headers plus the log messages of the locked revisions.
  1819. The last command prints complete information.
  1820. X.SH ENVIRONMENT
  1821. X.TP
  1822. X.B \s-1RCSINIT\s0
  1823. options prepended to the argument list, separated by spaces.
  1824. See
  1825. X.BR ci (1)
  1826. for details.
  1827. X.SH DIAGNOSTICS
  1828. The exit status is zero if and only if all operations were successful.
  1829. X.SH IDENTIFICATION
  1830. Author: Walter F. Tichy.
  1831. X.br
  1832. Revision Number: \*(Rv; Release Date: \*(Dt.
  1833. X.br
  1834. Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
  1835. X.br
  1836. Copyright \(co 1990, 1991 by Paul Eggert.
  1837. X.SH "SEE ALSO"
  1838. ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1),
  1839. rcsfile(5)
  1840. X.br
  1841. Walter F. Tichy,
  1842. X\*r\*-A System for Version Control,
  1843. X.I "Software\*-Practice & Experience"
  1844. X.BR 15 ,
  1845. X7 (July 1985), 637-654.
  1846. X.SH BUGS
  1847. The separator for revision ranges in the
  1848. X.B \-r
  1849. option used to be
  1850. X.B \-
  1851. instead of
  1852. X.BR : ,
  1853. but this leads to confusion when symbolic names contain
  1854. X.BR \- .
  1855. XFor backwards compatibility
  1856. X.B "rlog \-r"
  1857. still supports the old
  1858. X.B \-
  1859. separator, but it warns about this obsolete use.
  1860. X.br
  1861. END_OF_FILE
  1862. if test 5697 -ne `wc -c <'man/rlog.1'`; then
  1863.     echo shar: \"'man/rlog.1'\" unpacked with wrong size!
  1864. fi
  1865. # end of 'man/rlog.1'
  1866. fi
  1867. if test -f 'rcs_func.ms' -a "${1}" != "-c" ; then 
  1868.   echo shar: Will not clobber existing file \"'rcs_func.ms'\"
  1869. else
  1870. echo shar: Extracting \"'rcs_func.ms'\" \(3683 characters\)
  1871. sed "s/^X//" >'rcs_func.ms' <<'END_OF_FILE'
  1872. X.SH
  1873. XFunctions of RCS (Revision Control System)
  1874. X.PP
  1875. RCS manages software libraries. It greatly increases programmer productivity
  1876. by providing the following functions.
  1877. X.IP 1.
  1878. RCS stores and retrieves multiple revisions of program and other text.
  1879. Thus, one can maintain one or more releases while developing the next
  1880. release, with a minimum of space overhead. Changes no longer destroy the
  1881. original -- previous revisions remain accessible.
  1882. X.RS
  1883. X.IP a.
  1884. Maintains each module as a tree of revisions.
  1885. X.IP b.
  1886. Project libraries can
  1887. be organized centrally, decentralized, or any way you like.
  1888. X.IP c.
  1889. RCS works for any type of text: programs, documentation, memos, papers,
  1890. graphics, VLSI layouts, form letters, etc.
  1891. X.RE
  1892. X.IP 2.
  1893. RCS maintains a complete history of changes.
  1894. Thus, one can find out what happened to a module easily
  1895. and quickly, without having to compare source listings or
  1896. having to track down colleagues.
  1897. X.RS
  1898. X.IP a.
  1899. RCS performs automatic record keeping.
  1900. X.IP b.
  1901. RCS logs all changes automatically.
  1902. X.IP c.
  1903. RCS guarantees project continuity.
  1904. X.RE
  1905. X.IP 3.
  1906. RCS manages multiple lines of development.
  1907. X.IP 4.
  1908. RCS can merge multiple lines of development.
  1909. Thus, when several parallel lines of development must be consolidated
  1910. into one line, the merging of changes is automatic.
  1911. X.IP 5.
  1912. RCS flags coding conflicts.
  1913. If two or more lines of development modify the same section of code,
  1914. RCS can alert programmers about overlapping changes.
  1915. X.IP 6.
  1916. RCS resolves access conflicts.
  1917. When two or more programmers wish to modify the same revision,
  1918. RCS alerts the programmers and makes sure that one modification won't wipe
  1919. out the other one.
  1920. X.IP 7.
  1921. RCS provides high-level retrieval functions.
  1922. Revisions can be retrieved according to ranges of revision numbers,
  1923. symbolic names, dates, authors, and states.
  1924. X.IP 8.
  1925. RCS provides release and configuration control.
  1926. Revisions can be marked as released, stable, experimental, etc.
  1927. Configurations of modules can be described simply and directly.
  1928. X.IP 9.
  1929. RCS performs automatic identification of modules with name, revision
  1930. number, creation time, author, etc.
  1931. Thus, it is always possible to determine which revisions of which
  1932. modules make up a given configuration.
  1933. X.IP 10.
  1934. Provides high-level management visibility.
  1935. Thus, it is easy to track the status of a software project.
  1936. X.RS
  1937. X.IP a.
  1938. RCS provides a complete change history.
  1939. X.IP b.
  1940. RCS records who did what when to which revision of which module.
  1941. X.RE
  1942. X.IP 11.
  1943. RCS is fully compatible with existing software development tools.
  1944. RCS is unobtrusive -- its interface to the file system is such that
  1945. all your existing software tools can be used as before.
  1946. X.IP 12.
  1947. RCS' basic user interface is extremely simple. The novice need to learn
  1948. only two commands. Its more sophisticated features have been
  1949. tuned towards advanced software development environments and the
  1950. experienced software professional.
  1951. X.IP 13.
  1952. RCS simplifies software distribution if customers
  1953. maintain sources with RCS also. This technique assures proper
  1954. identification of versions and configurations, and tracking of customer
  1955. modifications. Customer modifications can be merged into distributed
  1956. versions locally or by the development group.
  1957. X.IP 14.
  1958. RCS needs little extra space for the revisions (only the differences).
  1959. If intermediate revisions are deleted, the corresponding
  1960. differences are compressed into the shortest possible form.
  1961. X.IP 15.
  1962. RCS is implemented with reverse deltas. This means that
  1963. the latest revision, which is the one that is accessed most often,
  1964. is stored intact. All others are regenerated from the latest one
  1965. by applying reverse deltas (backward differences). This
  1966. results in fast access time for the revision needed most often.
  1967. END_OF_FILE
  1968. if test 3683 -ne `wc -c <'rcs_func.ms'`; then
  1969.     echo shar: \"'rcs_func.ms'\" unpacked with wrong size!
  1970. fi
  1971. # end of 'rcs_func.ms'
  1972. fi
  1973. if test ! -d 'src' ; then
  1974.     echo shar: Creating directory \"'src'\"
  1975.     mkdir 'src'
  1976. fi
  1977. if test -f 'src/Makefile' -a "${1}" != "-c" ; then 
  1978.   echo shar: Will not clobber existing file \"'src/Makefile'\"
  1979. else
  1980. echo shar: Extracting \"'src/Makefile'\" \(6792 characters\)
  1981. sed "s/^X//" >'src/Makefile' <<'END_OF_FILE'
  1982. X# $Id: Makefile,v 5.16 1991/10/07 17:32:46 eggert Exp $
  1983. X# Copyright (C) 1982, 1988, 1989 Walter Tichy
  1984. X# Copyright 1990, 1991 by Paul Eggert
  1985. X#   Distributed under license by the Free Software Foundation, Inc.
  1986. X#
  1987. X# This file is part of RCS.
  1988. X#
  1989. X# RCS is free software; you can redistribute it and/or modify
  1990. X# it under the terms of the GNU General Public License as published by
  1991. X# the Free Software Foundation; either version 2, or (at your option)
  1992. X# any later version.
  1993. X#
  1994. X# RCS is distributed in the hope that it will be useful,
  1995. X# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1996. X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1997. X# GNU General Public License for more details.
  1998. X#
  1999. X# You should have received a copy of the GNU General Public License
  2000. X# along with RCS; see the file COPYING.  If not, write to
  2001. X# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  2002. X#
  2003. X# Report problems and direct all questions to:
  2004. X#
  2005. X#    rcs-bugs@cs.purdue.edu
  2006. X#
  2007. X
  2008. X# default target
  2009. default :: all
  2010. X
  2011. X# See README for more information on the configuration section.
  2012. X# ----- start of configuration section -----
  2013. X
  2014. X#(Unix
  2015. X
  2016. X CC = cc
  2017. X#CC = bsdcc -qlanglvl=ansi# AIX
  2018. X#CC = cc -g# debug
  2019. X#CC = gcc -g# GCC
  2020. X
  2021. X CC_D =
  2022. X
  2023. X CC_O = -O
  2024. X#CC_O =# debug
  2025. X#CC_O = -O -R# BSD compilers that do not support `const'
  2026. X#CC_O = -O -fdelayed-branch -finline-functions -fomit-frame-pointer -fstrength-reduce# GCC options for brave souls
  2027. X
  2028. X CC_W =
  2029. X#CC_W = -Wall -Wcast-qual -Wpointer-arith -Wshadow -Wwrite-strings# GCC
  2030. X
  2031. X CFLAGS = $(CC_D) $(CC_O) $(CC_W)
  2032. X
  2033. X COMPAT2 = 0
  2034. X#COMPAT2 = 1
  2035. X
  2036. X DIFF = $(DIFFPREFIX)diff
  2037. X#DIFF = $(DIFFPREFIX)rdiff# short for ``RCS diff'' on some hosts
  2038. X
  2039. X DIFFPREFIX = /usr/local/gnu/# GNU diff -- must be version 1.15 or later
  2040. X#DIFFPREFIX = /bin/# traditional diff
  2041. X#DIFFPREFIX = /usr/bin/# traditional diff (alternate name)
  2042. X
  2043. X DIFF_FLAGS = -an# GNU diff
  2044. X#DIFF_FLAGS = -n# traditional diff
  2045. X
  2046. X DIFF_L = 1# GNU diff
  2047. X#DIFF_L = 0# traditional diff
  2048. X
  2049. X DIFF_SUCCESS = 0
  2050. X#DIFF_SUCCESS = EXIT_SUCCESS
  2051. X DIFF_FAILURE = 1
  2052. X#DIFF_FAILURE = EXIT_FAILURE
  2053. X DIFF_TROUBLE = 2
  2054. X#DIFF_TROUBLE = (EXIT_FAILURE*2)
  2055. X
  2056. X DIFF3 = $(DIFF)3# GNU diff3
  2057. X#DIFF3 = /usr/lib/diff3# traditional diff3
  2058. X#DIFF3 = /usr/5lib/diff3prog# other aliases for traditional diff3
  2059. X#DIFF3 = /usr/lib/diff3prog
  2060. X#DIFF3 = /usr/lib/rdiff3
  2061. X
  2062. X DIFF3_BIN = 1# GNU diff
  2063. X#DIFF3_BIN = 0# traditional diff
  2064. X
  2065. X ED = /bin/ed
  2066. X
  2067. X EXECUTABLE_GROUP = staff# BSD unix installation
  2068. X EXECUTABLE_PERMISSIONS = -g $(EXECUTABLE_GROUP) -m 775# BSD unix installation
  2069. X INSTALL = install -c $(EXECUTABLE_PERMISSIONS)# BSD unix installation
  2070. X#INSTALL = cp# traditional Unix installation
  2071. X
  2072. X LDFLAGS =
  2073. X
  2074. X LDLIBS =
  2075. X
  2076. X LINK = $(CC) $(LDFLAGS)
  2077. X
  2078. X LINT = lint -abchx# traditional and BSD lint
  2079. X#LINT = lint# System V lint
  2080. X
  2081. X MAKE = make
  2082. X
  2083. X OTHER_OBJECT =
  2084. X
  2085. X RCSDIR = /usr/local/bin
  2086. X#RCSDIR = /bin
  2087. X#RCSDIR = /usr/bin
  2088. X
  2089. X RCSPREFIX = $(RCSDIR)/
  2090. X#RCSPREFIX =
  2091. X
  2092. X REMOVE = rm -f
  2093. X
  2094. X SENDMAIL = "/bin/mail"
  2095. X#SENDMAIL = "/etc/delivermail", "-w"
  2096. X#SENDMAIL = "/usr/bin/mail"
  2097. X#SENDMAIL = "/usr/lib/sendmail"
  2098. X#SENDMAIL = "mail"
  2099. X#SENDMAIL =# for impoverished hosts that lack electronic mail
  2100. X
  2101. X TESTPREFIX =
  2102. X
  2103. X o = .o
  2104. X#o = .s# Minix/PC with ACK cc
  2105. X
  2106. X x =
  2107. X
  2108. X#)
  2109. X# On non-Unix hosts you must manually create and edit conf.h from conf.heg.
  2110. X
  2111. X# ----- end of configuration section -----
  2112. X# You shouldn't have to change anything past this point.
  2113. X
  2114. X
  2115. X# Avoid brain damage in some versions of 'make'.
  2116. SHELL = /bin/sh
  2117. X
  2118. X# all commands
  2119. RCSCOMMANDS = ci$x co$x ident$x merge$x rcs$x rcsdiff$x rcsmerge$x rlog$x
  2120. X
  2121. all :: $(RCSCOMMANDS)
  2122. X
  2123. install :: all
  2124. X    $(INSTALL) ci$x $(DESTDIR)$(RCSDIR)
  2125. X    $(INSTALL) co$x $(DESTDIR)$(RCSDIR)
  2126. X    $(INSTALL) ident$x $(DESTDIR)$(RCSDIR)
  2127. X    $(INSTALL) merge$x $(DESTDIR)$(RCSDIR)
  2128. X    $(INSTALL) rcs$x $(DESTDIR)$(RCSDIR)
  2129. X    $(INSTALL) rcsdiff$x $(DESTDIR)$(RCSDIR)
  2130. X    $(INSTALL) rcsmerge$x $(DESTDIR)$(RCSDIR)
  2131. X    $(INSTALL) rlog$x $(DESTDIR)$(RCSDIR)
  2132. X
  2133. X# Install RCS and (if applicable) GNU diff before running these tests.
  2134. X# To test RCS before installing it, see README.
  2135. RCSTEST = PATH=$(RCSDIR):$(DIFFPREFIX).:$$PATH sh $(TESTPREFIX)rcstest
  2136. installtest ::
  2137. X    $(RCSTEST)
  2138. installdebug ::
  2139. X    $(RCSTEST) -v
  2140. X
  2141. clean ::
  2142. X    $(REMOVE) a.* *$o conf.h conf.error $(RCSCOMMANDS) rcsclean$x
  2143. X
  2144. X#(Unix
  2145. conf.h : conf.sh Makefile
  2146. X    $(REMOVE) a.*
  2147. X    CC='$(CC)' CFLAGS='$(CFLAGS)' \
  2148. X    COMPAT2='$(COMPAT2)' \
  2149. X    DIFF3='$(DIFF3)' DIFF3_BIN='$(DIFF3_BIN)' \
  2150. X    DIFF='$(DIFF)' DIFF_FLAGS='$(DIFF_FLAGS)' DIFF_L='$(DIFF_L)' \
  2151. X    DIFF_SUCCESS='$(DIFF_SUCCESS)' DIFF_FAILURE='$(DIFF_FAILURE)' DIFF_TROUBLE='$(DIFF_TROUBLE)' \
  2152. X    ED='$(ED)' \
  2153. X    LDFLAGS='$(LDFLAGS)' LDLIBS='$(LDLIBS)' \
  2154. X    RCSPREFIX='$(RCSPREFIX)' \
  2155. X    SENDMAIL='$(SENDMAIL)' \
  2156. X    sh -x conf.sh >a.h 2>conf.error
  2157. X    mv a.h $@
  2158. X    $(REMOVE) a.*
  2159. X#)
  2160. X
  2161. ci = ci$o rcslex$o rcssyn$o rcsgen$o rcsedit$o rcskeys$o rcsmap$o \
  2162. X    rcsrev$o rcsutil$o rcsfnms$o partime$o maketime$o rcskeep$o \
  2163. X    rcsfcmp$o $(OTHER_OBJECT)
  2164. ci$x : $(ci)
  2165. X    $(LINK) $(ci) $(LDLIBS) -o $@
  2166. X
  2167. co = co$o rcslex$o rcssyn$o rcsgen$o rcsedit$o rcskeys$o rcsmap$o \
  2168. X    rcsrev$o rcsutil$o rcsfnms$o partime$o maketime$o rcskeep$o $(OTHER_OBJECT)
  2169. co$x : $(co)
  2170. X    $(LINK) $(co) $(LDLIBS) -o $@
  2171. X
  2172. ident = ident$o rcsmap$o $(OTHER_OBJECT)
  2173. ident$x : $(ident)
  2174. X    $(LINK) $(ident) $(LDLIBS) -o $@
  2175. X
  2176. merge = merge$o merger$o rcsfnms$o rcslex$o \
  2177. X    rcsmap$o rcsrev$o rcssyn$o rcsutil$o \
  2178. X    rcskeep$o rcskeys$o $(OTHER_OBJECT)
  2179. merge$x : $(merge)
  2180. X    $(LINK) $(merge) $(LDLIBS) -o $@
  2181. X
  2182. rlog = rlog$o rcslex$o rcsmap$o rcssyn$o rcsrev$o rcsutil$o partime$o \
  2183. X    maketime$o rcsfnms$o rcskeep$o rcskeys$o $(OTHER_OBJECT)
  2184. rlog$x : $(rlog)
  2185. X    $(LINK) $(rlog) $(LDLIBS) -o $@
  2186. X
  2187. rcs = rcs$o rcslex$o rcssyn$o rcsrev$o rcsutil$o rcsgen$o rcsedit$o rcskeys$o \
  2188. X    rcsmap$o rcsfnms$o rcskeep$o $(OTHER_OBJECT)
  2189. rcs$x : $(rcs)
  2190. X    $(LINK) $(rcs) $(LDLIBS) -o $@
  2191. X
  2192. rcsclean = rcsclean$o rcsedit$o rcsfcmp$o rcsfnms$o rcsgen$o rcskeys$o \
  2193. X    rcslex$o rcsmap$o rcsrev$o rcssyn$o rcsutil$o rcskeep$o $(OTHER_OBJECT)
  2194. rcsclean$x : $(rcsclean)
  2195. X    $(LINK) $(rcsclean) $(LDLIBS) -o $@
  2196. X
  2197. rcsdiff = rcsdiff$o rcsutil$o rcsfnms$o rcsmap$o rcsrev$o rcssyn$o rcslex$o \
  2198. X    maketime$o partime$o rcskeep$o rcskeys$o $(OTHER_OBJECT)
  2199. rcsdiff$x : $(rcsdiff)
  2200. X    $(LINK) $(rcsdiff) $(LDLIBS) -o $@
  2201. X
  2202. rcsmerge = rcsmerge$o merger$o rcsutil$o rcsfnms$o rcsmap$o rcsrev$o rcssyn$o \
  2203. X    rcslex$o rcskeep$o rcskeys$o $(OTHER_OBJECT)
  2204. rcsmerge$x : $(rcsmerge)
  2205. X    $(LINK) $(rcsmerge) $(LDLIBS) -o $@
  2206. X
  2207. SOURCE=    ci.c co.c ident.c maketime.c merge.c merger.c partime.c rcs.c \
  2208. X    rcsclean.c rcsdiff.c rcsedit.c rcsfcmp.c rcsfnms.c rcsgen.c \
  2209. X    rcskeep.c rcskeys.c rcslex.c rcsmap.c rcsmerge.c rcsrev.c rcssyn.c \
  2210. X    rcsutil.c rlog.c
  2211. OBJECT=    ci$o co$o ident$o maketime$o merge$o merger$o partime$o rcs$o \
  2212. X    rcsclean$o rcsdiff$o rcsedit$o rcsfcmp$o rcsfnms$o rcsgen$o \
  2213. X    rcskeep$o rcskeys$o rcslex$o rcsmap$o rcsmerge$o rcsrev$o rcssyn$o \
  2214. X    rcsutil$o rlog$o
  2215. X
  2216. lint :: conf.h
  2217. X    $(LINT) $(CC_D) -Dlint=1 $(SOURCE)
  2218. X
  2219. conf_h = conf.h
  2220. X$(OBJECT) : $(conf_h) rcsbase.h
  2221. END_OF_FILE
  2222. if test 6792 -ne `wc -c <'src/Makefile'`; then
  2223.     echo shar: \"'src/Makefile'\" unpacked with wrong size!
  2224. fi
  2225. # end of 'src/Makefile'
  2226. fi
  2227. if test -f 'src/ident.c' -a "${1}" != "-c" ; then 
  2228.   echo shar: Will not clobber existing file \"'src/ident.c'\"
  2229. else
  2230. echo shar: Extracting \"'src/ident.c'\" \(5571 characters\)
  2231. sed "s/^X//" >'src/ident.c' <<'END_OF_FILE'
  2232. X/* Copyright (C) 1982, 1988, 1989 Walter Tichy
  2233. X   Copyright 1990, 1991 by Paul Eggert
  2234. X   Distributed under license by the Free Software Foundation, Inc.
  2235. X
  2236. This file is part of RCS.
  2237. X
  2238. RCS is free software; you can redistribute it and/or modify
  2239. it under the terms of the GNU General Public License as published by
  2240. the Free Software Foundation; either version 2, or (at your option)
  2241. any later version.
  2242. X
  2243. RCS is distributed in the hope that it will be useful,
  2244. but WITHOUT ANY WARRANTY; without even the implied warranty of
  2245. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2246. GNU General Public License for more details.
  2247. X
  2248. You should have received a copy of the GNU General Public License
  2249. along with RCS; see the file COPYING.  If not, write to
  2250. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  2251. X
  2252. Report problems and direct all questions to:
  2253. X
  2254. X    rcs-bugs@cs.purdue.edu
  2255. X
  2256. X*/
  2257. X
  2258. X/*
  2259. X *                     RCS identification operation
  2260. X */
  2261. X
  2262. X/* $Log: ident.c,v $
  2263. X * Revision 5.3  1991/09/10  22:15:46  eggert
  2264. X * Open files with FOPEN_R, not FOPEN_R_WORK,
  2265. X * because they might be executables, not working files.
  2266. X *
  2267. X * Revision 5.2  1991/08/19  03:13:55  eggert
  2268. X * Report read errors immediately.
  2269. X *
  2270. X * Revision 5.1  1991/02/25  07:12:37  eggert
  2271. X * Don't report empty keywords.  Check for I/O errors.
  2272. X *
  2273. X * Revision 5.0  1990/08/22  08:12:37  eggert
  2274. X * Don't limit output to known keywords.
  2275. X * Remove arbitrary limits and lint.  Ansify and Posixate.
  2276. X *
  2277. X * Revision 4.5  89/05/01  15:11:54  narten
  2278. X * changed copyright header to reflect current distribution rules
  2279. X * 
  2280. X * Revision 4.4  87/10/23  17:09:57  narten
  2281. X * added exit(0) so exit return code would be non random
  2282. X * 
  2283. X * Revision 4.3  87/10/18  10:23:55  narten
  2284. X * Updating version numbers. Changes relative to 1.1 are actually relative
  2285. X * to 4.1
  2286. X * 
  2287. X * Revision 1.3  87/07/09  09:20:52  trinkle
  2288. X * Added check to make sure there is at least one arg before comparing argv[1]
  2289. X * with "-q".  This necessary on machines that don't allow dereferncing null
  2290. X * pointers (i.e. Suns).
  2291. X * 
  2292. X * Revision 1.2  87/03/27  14:21:47  jenkins
  2293. X * Port to suns
  2294. X * 
  2295. X * Revision 4.1  83/05/10  16:31:02  wft
  2296. X * Added option -q and input from reading stdin.
  2297. X * Marker matching is now done with trymatch() (independent of keywords).
  2298. X * 
  2299. X * Revision 3.4  83/02/18  17:37:49  wft
  2300. X * removed printing of new line after last file.
  2301. X *
  2302. X * Revision 3.3  82/12/04  12:48:55  wft
  2303. X * Added LOCKER.
  2304. X *
  2305. X * Revision 3.2  82/11/28  18:24:17  wft
  2306. X * removed Suffix; added ungetc to avoid skipping over trailing KDELIM.
  2307. X *
  2308. X * Revision 3.1  82/10/13  15:58:51  wft
  2309. X * fixed type of variables receiving from getc() (char-->int).
  2310. X*/
  2311. X
  2312. X#include  "rcsbase.h"
  2313. X
  2314. static int match P((FILE*));
  2315. static void scanfile P((FILE*,char const*,int));
  2316. X
  2317. mainProg(identId, "ident", "$Id: ident.c,v 5.3 1991/09/10 22:15:46 eggert Exp $")
  2318. X/*  Ident searches the named files for all occurrences
  2319. X *  of the pattern $keyword:...$, where the keywords are
  2320. X *  Author, Date, Header, Id, Log, RCSfile, Revision, Source, and State.
  2321. X */
  2322. X
  2323. X{
  2324. X   FILE *fp;
  2325. X   int quiet;
  2326. X   int status = EXIT_SUCCESS;
  2327. X
  2328. X   if ((quiet  =  argc > 1 && strcmp("-q",argv[1])==0)) {
  2329. X        argc--; argv++;
  2330. X   }
  2331. X
  2332. X   if (argc<2)
  2333. X    scanfile(stdin, (char*)0, quiet);
  2334. X
  2335. X   while ( --argc > 0 ) {
  2336. X      if (!(fp = fopen(*++argv, FOPEN_R))) {
  2337. X     VOID fprintf(stderr,  "%s error: can't open %s\n", cmdid, *argv);
  2338. X     status = EXIT_FAILURE;
  2339. X      } else {
  2340. X     scanfile(fp, *argv, quiet);
  2341. X     if (argc>1) VOID putchar('\n');
  2342. X      }
  2343. X   }
  2344. X   if (ferror(stdout) || fclose(stdout)!=0) {
  2345. X      VOID fprintf(stderr,  "%s error: write error\n", cmdid);
  2346. X      status = EXIT_FAILURE;
  2347. X   }
  2348. X   exitmain(status);
  2349. X}
  2350. X
  2351. X#if lint
  2352. X    exiting void identExit() { _exit(EXIT_FAILURE); }
  2353. X#endif
  2354. X
  2355. X
  2356. X    static void
  2357. scanfile(file, name, quiet)
  2358. X    register FILE *file;
  2359. X    char const *name;
  2360. X    int quiet;
  2361. X/* Function: scan an open file with descriptor file for keywords.
  2362. X * Return false if there's a read error.
  2363. X */
  2364. X{
  2365. X   register int c;
  2366. X
  2367. X   if (name)
  2368. X      VOID printf("%s:\n", name);
  2369. X   else
  2370. X      name = "input";
  2371. X   c = 0;
  2372. X   for (;;) {
  2373. X      if (c < 0) {
  2374. X     if (feof(file))
  2375. X        break;
  2376. X     if (ferror(file))
  2377. X        goto read_error;
  2378. X      }
  2379. X      if (c == KDELIM) {
  2380. X     if ((c = match(file)))
  2381. X        continue;
  2382. X     quiet = true;
  2383. X      }
  2384. X      c = getc(file);
  2385. X   }
  2386. X   if (!quiet)
  2387. X      VOID fprintf(stderr, "%s warning: no id keywords in %s\n", cmdid, name);
  2388. X   if (fclose(file) == 0)
  2389. X      return;
  2390. X
  2391. X read_error:
  2392. X   VOID fprintf(stderr, "%s error: %s: read error\n", cmdid, name);
  2393. X   exit(EXIT_FAILURE);
  2394. X}
  2395. X
  2396. X
  2397. X
  2398. X    static int
  2399. match(fp)   /* group substring between two KDELIM's; then do pattern match */
  2400. X   register FILE *fp;
  2401. X{
  2402. X   char line[BUFSIZ];
  2403. X   register int c;
  2404. X   register char * tp;
  2405. X
  2406. X   tp = line;
  2407. X   while ((c = getc(fp)) != VDELIM) {
  2408. X      if (c < 0)
  2409. X     return c;
  2410. X      switch (ctab[c]) {
  2411. X     case LETTER: case Letter:
  2412. X        *tp++ = c;
  2413. X        if (tp < line+sizeof(line)-4)
  2414. X           break;
  2415. X        /* fall into */
  2416. X     default:
  2417. X        return c ? c : '\n'/* anything but 0 or KDELIM or EOF */;
  2418. X      }
  2419. X   }
  2420. X   if (tp == line)
  2421. X      return c;
  2422. X   *tp++ = c;
  2423. X   if ((c = getc(fp)) != ' ')
  2424. X      return c ? c : '\n';
  2425. X   *tp++ = c;
  2426. X   while( (c = getc(fp)) != KDELIM ) {
  2427. X      if (c < 0  &&  feof(fp) | ferror(fp))
  2428. X        return c;
  2429. X      switch (ctab[c]) {
  2430. X     default:
  2431. X        *tp++ = c;
  2432. X        if (tp < line+sizeof(line)-2)
  2433. X           break;
  2434. X        /* fall into */
  2435. X     case NEWLN: case UNKN:
  2436. X        return c ? c : '\n';
  2437. X      }
  2438. X   }
  2439. X   if (tp[-1] != ' ')
  2440. X      return c;
  2441. X   *tp++ = c;     /*append trailing KDELIM*/
  2442. X   *tp   = '\0';
  2443. X   VOID fprintf(stdout, "     %c%s\n", KDELIM, line);
  2444. X   return 0;
  2445. X}
  2446. END_OF_FILE
  2447. if test 5571 -ne `wc -c <'src/ident.c'`; then
  2448.     echo shar: \"'src/ident.c'\" unpacked with wrong size!
  2449. fi
  2450. # end of 'src/ident.c'
  2451. fi
  2452. if test -f 'src/merge.c' -a "${1}" != "-c" ; then 
  2453.   echo shar: Will not clobber existing file \"'src/merge.c'\"
  2454. else
  2455. echo shar: Extracting \"'src/merge.c'\" \(2143 characters\)
  2456. sed "s/^X//" >'src/merge.c' <<'END_OF_FILE'
  2457. X/* merge - three-way file merge */
  2458. X
  2459. X/* Copyright 1991 by Paul Eggert
  2460. X   Distributed under license by the Free Software Foundation, Inc.
  2461. X
  2462. This file is part of RCS.
  2463. X
  2464. RCS is free software; you can redistribute it and/or modify
  2465. it under the terms of the GNU General Public License as published by
  2466. the Free Software Foundation; either version 2, or (at your option)
  2467. any later version.
  2468. X
  2469. RCS is distributed in the hope that it will be useful,
  2470. but WITHOUT ANY WARRANTY; without even the implied warranty of
  2471. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2472. GNU General Public License for more details.
  2473. X
  2474. You should have received a copy of the GNU General Public License
  2475. along with RCS; see the file COPYING.  If not, write to
  2476. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  2477. X
  2478. Report problems and direct all questions to:
  2479. X
  2480. X    rcs-bugs@cs.purdue.edu
  2481. X
  2482. X*/
  2483. X
  2484. X#include "rcsbase.h"
  2485. X
  2486. X
  2487. static char const usage[] =
  2488. X "\nmerge: usage: merge [-p] [-q] [-L label1 [-L label3]] file1 file2 file3\n";
  2489. X
  2490. X    static exiting void
  2491. badoption(a)
  2492. X    char const *a;
  2493. X{
  2494. X    faterror("unknown option: %s%s", a-2, usage);
  2495. X}
  2496. X
  2497. X
  2498. mainProg(mergeId, "merge", "$Id: merge.c,v 1.2 1991/08/19 03:13:55 eggert Exp $")
  2499. X{
  2500. X    register char const *a;
  2501. X    char const *label[2], *arg[3];
  2502. X    int labels, tostdout;
  2503. X
  2504. X    labels = 0;
  2505. X    tostdout = false;
  2506. X
  2507. X    while ((a = *++argv)  &&  *a++ == '-') {
  2508. X        switch (*a++) {
  2509. X            case 'p': tostdout = true; break;
  2510. X            case 'q': quietflag = true; break;
  2511. X            case 'L':
  2512. X                if (1<labels)
  2513. X                    faterror("too many -L options");
  2514. X                if (!(label[labels++] = *++argv))
  2515. X                    faterror("-L needs following argument");
  2516. X                --argc;
  2517. X                break;
  2518. X            default:
  2519. X                badoption(a);
  2520. X        }
  2521. X        if (*a)
  2522. X            badoption(a);
  2523. X        --argc;
  2524. X    }
  2525. X
  2526. X    if (argc != 4)
  2527. X        faterror("%s arguments%s",
  2528. X            argc<4 ? "not enough" : "too many",  usage
  2529. X        );
  2530. X
  2531. X    /* This copy keeps us `const'-clean.  */
  2532. X    arg[0] = argv[0];
  2533. X    arg[1] = argv[1];
  2534. X    arg[2] = argv[2];
  2535. X
  2536. X    switch (labels) {
  2537. X        case 0: label[0] = arg[0]; /* fall into */
  2538. X        case 1: label[1] = arg[2];
  2539. X    }
  2540. X
  2541. X    exitmain(merge(tostdout, label, arg));
  2542. X}
  2543. X
  2544. X
  2545. X#if lint
  2546. X#    define exiterr mergeExit
  2547. X#endif
  2548. X    exiting void
  2549. exiterr()
  2550. X{
  2551. X    tempunlink();
  2552. X    _exit(DIFF_TROUBLE);
  2553. X}
  2554. END_OF_FILE
  2555. if test 2143 -ne `wc -c <'src/merge.c'`; then
  2556.     echo shar: \"'src/merge.c'\" unpacked with wrong size!
  2557. fi
  2558. # end of 'src/merge.c'
  2559. fi
  2560. if test -f 'src/merger.c' -a "${1}" != "-c" ; then 
  2561.   echo shar: Will not clobber existing file \"'src/merger.c'\"
  2562. else
  2563. echo shar: Extracting \"'src/merger.c'\" \(3036 characters\)
  2564. sed "s/^X//" >'src/merger.c' <<'END_OF_FILE'
  2565. X/* merger - three-way file merge internals */
  2566. X
  2567. X/* Copyright 1991 by Paul Eggert
  2568. X   Distributed under license by the Free Software Foundation, Inc.
  2569. X
  2570. This file is part of RCS.
  2571. X
  2572. RCS is free software; you can redistribute it and/or modify
  2573. it under the terms of the GNU General Public License as published by
  2574. the Free Software Foundation; either version 2, or (at your option)
  2575. any later version.
  2576. X
  2577. RCS is distributed in the hope that it will be useful,
  2578. but WITHOUT ANY WARRANTY; without even the implied warranty of
  2579. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2580. GNU General Public License for more details.
  2581. X
  2582. You should have received a copy of the GNU General Public License
  2583. along with RCS; see the file COPYING.  If not, write to
  2584. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  2585. X
  2586. Report problems and direct all questions to:
  2587. X
  2588. X    rcs-bugs@cs.purdue.edu
  2589. X
  2590. X*/
  2591. X
  2592. X#include "rcsbase.h"
  2593. X
  2594. libId(mergerId, "$Id: merger.c,v 1.3 1991/08/20 23:05:00 eggert Exp $")
  2595. X
  2596. X    static char const *
  2597. normalize_arg(s, b)
  2598. X    char const *s;
  2599. X    char **b;
  2600. X/*
  2601. X * If S looks like an option, prepend ./ to it.  Yield the result.
  2602. X * Set *B to the address of any storage that was allocated..
  2603. X */
  2604. X{
  2605. X    char *t;
  2606. X    switch (*s) {
  2607. X        case '-': case '+':
  2608. X            *b = t = testalloc(strlen(s) + 3);
  2609. X            VOID sprintf(t, ".%c%s", SLASH, s);
  2610. X            return t;
  2611. X        default:
  2612. X            *b = 0;
  2613. X            return s;
  2614. X    }
  2615. X}
  2616. X
  2617. X    int
  2618. merge(tostdout, label, argv)
  2619. X    int tostdout;
  2620. X    char const *const label[2];
  2621. X    char const *const argv[3];
  2622. X/*
  2623. X * Do `merge [-p] -L l0 -L l1 a0 a1 a2',
  2624. X * where TOSTDOUT specifies whether -p is present,
  2625. X * LABEL gives l0 and l1, and ARGV gives a0, a1, and a2.
  2626. X * Yield DIFF_SUCCESS or DIFF_FAILURE.
  2627. X */
  2628. X{
  2629. X    register int i;
  2630. X    FILE *f;
  2631. X    RILE *rt;
  2632. X    char const *a[3], *t;
  2633. X    char *b[3];
  2634. X    int s;
  2635. X#if !DIFF3_BIN
  2636. X    char const *d[2];
  2637. X#endif
  2638. X
  2639. X    for (i=3; 0<=--i; )
  2640. X        a[i] = normalize_arg(argv[i], &b[i]);
  2641. X
  2642. X#if DIFF3_BIN
  2643. X    t = 0;
  2644. X    if (!tostdout)
  2645. X        t = maketemp(0);
  2646. X    s = run(
  2647. X        (char*)0, t,
  2648. X        DIFF3, "-am", "-L", label[0], "-L", label[1],
  2649. X        a[0], a[1], a[2], (char*)0
  2650. X    );
  2651. X    switch (s) {
  2652. X        case DIFF_SUCCESS:
  2653. X            break;
  2654. X        case DIFF_FAILURE:
  2655. X            if (!quietflag)
  2656. X                warn("overlaps during merge");
  2657. X            break;
  2658. X        default:
  2659. X            exiterr();
  2660. X    }
  2661. X    if (t) {
  2662. X        if (!(f = fopen(argv[0], FOPEN_W)))
  2663. X            efaterror(argv[0]);
  2664. X        if (!(rt = Iopen(t, FOPEN_R, (struct stat*)0)))
  2665. X            efaterror(t);
  2666. X        fastcopy(rt, f);
  2667. X        Ifclose(rt);
  2668. X        Ofclose(f);
  2669. X    }
  2670. X#else
  2671. X    for (i=0; i<2; i++)
  2672. X        switch (run(
  2673. X            (char*)0, d[i]=maketemp(i),
  2674. X            DIFF, a[i], a[2], (char*)0
  2675. X        )) {
  2676. X            case DIFF_FAILURE: case DIFF_SUCCESS: break;
  2677. X            default: exiterr();
  2678. X        }
  2679. X    t = maketemp(2);
  2680. X    s = run(
  2681. X        (char*)0, t,
  2682. X        DIFF3, "-E", d[0], d[1], a[0], a[1], a[2],
  2683. X        label[0], label[1], (char*)0
  2684. X    );
  2685. X    if (s != DIFF_SUCCESS) {
  2686. X        s = DIFF_FAILURE;
  2687. X        if (!quietflag)
  2688. X            warn("overlaps or other problems during merge");
  2689. X    }
  2690. X    if (!(f = fopen(t, "a")))
  2691. X        efaterror(t);
  2692. X    aputs(tostdout ? "1,$p\n" : "w\n",  f);
  2693. X    Ofclose(f);
  2694. X    if (run(t, (char*)0, ED, "-", a[0], (char*)0))
  2695. X        exiterr();
  2696. X#endif
  2697. X
  2698. X    tempunlink();
  2699. X    for (i=3; 0<=--i; )
  2700. X        if (b[i])
  2701. X            tfree(b[i]);
  2702. X    return s;
  2703. X}
  2704. END_OF_FILE
  2705. if test 3036 -ne `wc -c <'src/merger.c'`; then
  2706.     echo shar: \"'src/merger.c'\" unpacked with wrong size!
  2707. fi
  2708. # end of 'src/merger.c'
  2709. fi
  2710. if test -f 'src/rcsclean.c' -a "${1}" != "-c" ; then 
  2711.   echo shar: Will not clobber existing file \"'src/rcsclean.c'\"
  2712. else
  2713. echo shar: Extracting \"'src/rcsclean.c'\" \(6396 characters\)
  2714. sed "s/^X//" >'src/rcsclean.c' <<'END_OF_FILE'
  2715. X/* rcsclean - clean up working files */
  2716. X
  2717. X/* Copyright 1991 by Paul Eggert
  2718. X   Distributed under license by the Free Software Foundation, Inc.
  2719. X
  2720. This file is part of RCS.
  2721. X
  2722. RCS is free software; you can redistribute it and/or modify
  2723. it under the terms of the GNU General Public License as published by
  2724. the Free Software Foundation; either version 2, or (at your option)
  2725. any later version.
  2726. X
  2727. RCS is distributed in the hope that it will be useful,
  2728. but WITHOUT ANY WARRANTY; without even the implied warranty of
  2729. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2730. GNU General Public License for more details.
  2731. X
  2732. You should have received a copy of the GNU General Public License
  2733. along with RCS; see the file COPYING.  If not, write to
  2734. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  2735. X
  2736. Report problems and direct all questions to:
  2737. X
  2738. X    rcs-bugs@cs.purdue.edu
  2739. X
  2740. X*/
  2741. X
  2742. X#include "rcsbase.h"
  2743. X
  2744. X#if has_dirent
  2745. X    static int get_directory P((char const*,char***));
  2746. X#endif
  2747. X
  2748. static int unlock P((struct hshentry *));
  2749. static void cleanup P((void));
  2750. X
  2751. static RILE *workptr;
  2752. static int exitstatus;
  2753. X
  2754. mainProg(rcscleanId, "rcsclean", "$Id: rcsclean.c,v 5.1 1991/11/03 01:11:44 eggert Exp $")
  2755. X{
  2756. X    static char const usage[] =
  2757. X        "\nrcsclean: usage: rcsclean [-ksubst] [-{nqru}[rev]] [-Vn] [-xsuffixes] [file ...]";
  2758. X
  2759. X    static struct buf revision;
  2760. X
  2761. X    char *a, **newargv;
  2762. X    char const *rev, *p;
  2763. X    int changelock, expmode, perform, unlocked, unlockflag, waslocked;
  2764. X    struct hshentries *deltas;
  2765. X    struct hshentry *delta;
  2766. X    struct stat workstat;
  2767. X
  2768. X    setrid();
  2769. X
  2770. X    expmode = -1;
  2771. X    rev = nil;
  2772. X    suffixes = X_DEFAULT;
  2773. X    perform = true;
  2774. X    unlockflag = false;
  2775. X
  2776. X    argc = getRCSINIT(argc, argv, &newargv);
  2777. X    argv = newargv;
  2778. X    for (;;) {
  2779. X        if (--argc <= 0) {
  2780. X#            if has_dirent
  2781. X                argc = get_directory(".", &newargv);
  2782. X                argv = newargv;
  2783. X                break;
  2784. X#            else
  2785. X                faterror("no file names specified");
  2786. X#            endif
  2787. X        }
  2788. X        a = *++argv;
  2789. X        if (*a++ != '-')
  2790. X            break;
  2791. X        switch (*a++) {
  2792. X            case 'k':
  2793. X                if (0 <= expmode)
  2794. X                    redefined('k');
  2795. X                if ((expmode = str2expmode(a))  <  0)
  2796. X                    goto unknown;
  2797. X                break;
  2798. X
  2799. X            case 'n':
  2800. X                perform = false;
  2801. X                goto handle_revision;
  2802. X
  2803. X            case 'q':
  2804. X                quietflag = true;
  2805. X                /* fall into */
  2806. X            case 'r':
  2807. X            handle_revision:
  2808. X                if (*a) {
  2809. X                    if (rev)
  2810. X                        warn("redefinition of revision number");
  2811. X                    rev = a;
  2812. X                }
  2813. X                break;
  2814. X
  2815. X            case 'u':
  2816. X                unlockflag = true;
  2817. X                goto handle_revision;
  2818. X
  2819. X            case 'V':
  2820. X                setRCSversion(*argv);
  2821. X                break;
  2822. X
  2823. X            case 'x':
  2824. X                suffixes = a;
  2825. X                break;
  2826. X
  2827. X            default:
  2828. X            unknown:
  2829. X                faterror("unknown option: %s%s", *argv, usage);
  2830. X        }
  2831. X    }
  2832. X
  2833. X    do {
  2834. X        ffree();
  2835. X
  2836. X        if (!(
  2837. X            0 < pairfilenames(
  2838. X                argc, argv,
  2839. X                unlockflag&perform ? rcswriteopen : rcsreadopen,
  2840. X                true, true
  2841. X            ) &&
  2842. X            (workptr = Iopen(workfilename,FOPEN_R_WORK,&workstat))
  2843. X        ))
  2844. X            continue;
  2845. X
  2846. X        gettree();
  2847. X
  2848. X        p = 0;
  2849. X        if (rev) {
  2850. X            if (!fexpandsym(rev, &revision, workptr))
  2851. X                continue;
  2852. X            p = revision.string;
  2853. X        } else if (Head)
  2854. X            switch (unlockflag ? findlock(false,&delta) : 0) {
  2855. X                default:
  2856. X                    continue;
  2857. X                case 0:
  2858. X                    p = Dbranch ? Dbranch : "";
  2859. X                    break;
  2860. X                case 1:
  2861. X                    p = delta->num;
  2862. X                    break;
  2863. X            }
  2864. X        delta = 0;
  2865. X        deltas = 0;  /* Keep lint happy.  */
  2866. X        if (p  &&  !(delta = genrevs(p,(char*)0,(char*)0,(char*)0,&deltas)))
  2867. X            continue;
  2868. X
  2869. X        waslocked = delta && delta->lockedby;
  2870. X        locker_expansion = unlock(delta);
  2871. X        unlocked = locker_expansion & unlockflag;
  2872. X        changelock = unlocked & perform;
  2873. X        if (unlocked<waslocked  &&  workstat.st_mode&(S_IWUSR|S_IWGRP|S_IWOTH))
  2874. X            continue;
  2875. X
  2876. X        if (!dorewrite(unlockflag, changelock))
  2877. X            continue;
  2878. X
  2879. X        if (0 <= expmode)
  2880. X            Expand = expmode;
  2881. X        else if (
  2882. X            waslocked  &&
  2883. X            Expand == KEYVAL_EXPAND  &&
  2884. X            WORKMODE(RCSstat.st_mode,true) == workstat.st_mode
  2885. X        )
  2886. X            Expand = KEYVALLOCK_EXPAND;
  2887. X
  2888. X        getdesc(false);
  2889. X
  2890. X        if (
  2891. X            !delta ? workstat.st_size!=0 :
  2892. X            0 < rcsfcmp(
  2893. X                workptr, &workstat,
  2894. X                buildrevision(deltas, delta, (FILE*)0, false),
  2895. X                delta
  2896. X            )
  2897. X        )
  2898. X            continue;
  2899. X
  2900. X        if (quietflag < unlocked)
  2901. X            aprintf(stdout, "rcs -u%s %s\n", delta->num, RCSfilename);
  2902. X
  2903. X        if_advise_access(changelock  &&  deltas->first != delta,
  2904. X            finptr, MADV_SEQUENTIAL
  2905. X        );
  2906. X        if (!donerewrite(changelock))
  2907. X            continue;
  2908. X
  2909. X        if (!quietflag)
  2910. X            aprintf(stdout, "rm -f %s\n", workfilename);
  2911. X        Izclose(&workptr);
  2912. X        if (perform  &&  un_link(workfilename) != 0)
  2913. X            eerror(workfilename);
  2914. X
  2915. X    } while (cleanup(),  ++argv,  0 < --argc);
  2916. X
  2917. X    tempunlink();
  2918. X    if (!quietflag)
  2919. X        Ofclose(stdout);
  2920. X    exitmain(exitstatus);
  2921. X}
  2922. X
  2923. X    static void
  2924. cleanup()
  2925. X{
  2926. X    if (nerror) exitstatus = EXIT_FAILURE;
  2927. X    Izclose(&finptr);
  2928. X    Izclose(&workptr);
  2929. X    Ozclose(&fcopy);
  2930. X    Ozclose(&frewrite);
  2931. X    dirtempunlink();
  2932. X}
  2933. X
  2934. X#if lint
  2935. X#       define exiterr rcscleanExit
  2936. X#endif
  2937. X    exiting void
  2938. exiterr()
  2939. X{
  2940. X    dirtempunlink();
  2941. X    tempunlink();
  2942. X    _exit(EXIT_FAILURE);
  2943. X}
  2944. X
  2945. X    static int
  2946. unlock(delta)
  2947. X    struct hshentry *delta;
  2948. X{
  2949. X    register struct lock **al, *l;
  2950. X
  2951. X    if (delta && delta->lockedby && strcmp(getcaller(),delta->lockedby)==0)
  2952. X        for (al = &Locks;  (l = *al);  al = &l->nextlock)
  2953. X            if (l->delta == delta) {
  2954. X                *al = l->nextlock;
  2955. X                delta->lockedby = 0;
  2956. X                return true;
  2957. X            }
  2958. X    return false;
  2959. X}
  2960. X
  2961. X#if has_dirent
  2962. X    static int
  2963. get_directory(dirname, aargv)
  2964. X    char const *dirname;
  2965. X    char ***aargv;
  2966. X/*
  2967. X * Put a vector of all DIRNAME's directory entries names into *AARGV.
  2968. X * Ignore names of RCS files.
  2969. X * Yield the number of entries found.  Terminate the vector with 0.
  2970. X * Allocate the storage for the vector and entry names.
  2971. X * Do not sort the names.  Do not include '.' and '..'.
  2972. X */
  2973. X{
  2974. X    int i, entries = 0, entries_max = 64;
  2975. X    size_t chars = 0, chars_max = 1024;
  2976. X    size_t *offset = tnalloc(size_t, entries_max);
  2977. X    char *a = tnalloc(char, chars_max), **p;
  2978. X    DIR *d;
  2979. X    struct dirent *e;
  2980. X
  2981. X    if (!(d = opendir(dirname)))
  2982. X        efaterror(dirname);
  2983. X    while ((errno = 0,  e = readdir(d))) {
  2984. X        char const *en = e->d_name;
  2985. X        size_t s = strlen(en) + 1;
  2986. X        if (en[0]=='.'   &&   (!en[1]  ||  en[1]=='.' && !en[2]))
  2987. X            continue;
  2988. X        if (rcssuffix(en))
  2989. X            continue;
  2990. X        while (chars_max < s + chars)
  2991. X            a = trealloc(char, a, chars_max<<=1);
  2992. X        if (entries == entries_max)
  2993. X            offset = trealloc(size_t, offset, entries_max<<=1);
  2994. X        offset[entries++] = chars;
  2995. X        VOID strcpy(a+chars, en);
  2996. X        chars += s;
  2997. X    }
  2998. X    if (errno  ||  closedir(d) != 0)
  2999. X        efaterror(dirname);
  3000. X    if (chars)
  3001. X        a = trealloc(char, a, chars);
  3002. X    else
  3003. X        tfree(a);
  3004. X    *aargv = p = tnalloc(char*, entries+1);
  3005. X    for (i=0; i<entries; i++)
  3006. X        *p++ = a + offset[i];
  3007. X    *p = 0;
  3008. X    tfree(offset);
  3009. X    return entries;
  3010. X}
  3011. X#endif
  3012. END_OF_FILE
  3013. if test 6396 -ne `wc -c <'src/rcsclean.c'`; then
  3014.     echo shar: \"'src/rcsclean.c'\" unpacked with wrong size!
  3015. fi
  3016. # end of 'src/rcsclean.c'
  3017. fi
  3018. if test -f 'src/rcsfreeze.sh' -a "${1}" != "-c" ; then 
  3019.   echo shar: Will not clobber existing file \"'src/rcsfreeze.sh'\"
  3020. else
  3021. echo shar: Extracting \"'src/rcsfreeze.sh'\" \(3267 characters\)
  3022. sed "s/^X//" >'src/rcsfreeze.sh' <<'END_OF_FILE'
  3023. X#! /bin/sh
  3024. X
  3025. X# rcsfreeze - assign a symbolic revision number to a configuration of RCS files
  3026. X
  3027. X#    $Id: rcsfreeze.sh,v 4.4 1991/04/21 11:58:24 eggert Exp $
  3028. X
  3029. X#       The idea is to run rcsfreeze each time a new version is checked
  3030. X#       in. A unique symbolic revision number (C_[number], where number
  3031. X#       is increased each time rcsfreeze is run) is then assigned to the most
  3032. X#       recent revision of each RCS file of the main trunk.
  3033. X#
  3034. X#       If the command is invoked with an argument, then this
  3035. X#       argument is used as the symbolic name to freeze a configuration.
  3036. X#       The unique identifier is still generated
  3037. X#       and is listed in the log file but it will not appear as
  3038. X#       part of the symbolic revision name in the actual RCS file.
  3039. X#
  3040. X#       A log message is requested from the user which is saved for future
  3041. X#       references.
  3042. X#
  3043. X#       The shell script works only on all RCS files at one time.
  3044. X#       It is important that all changed files are checked in (there are
  3045. X#       no precautions against any error in this respect).
  3046. X#       file names:
  3047. X#       {RCS/}.rcsfreeze.ver    version number
  3048. X#       {RCS/}.rscfreeze.log    log messages, most recent first
  3049. X
  3050. PATH=/usr/local/bin:/bin:/usr/bin:/usr/ucb:$PATH
  3051. export PATH
  3052. X
  3053. DATE=`date` || exit
  3054. X# Check whether we have an RCS subdirectory, so we can have the right
  3055. X# prefix for our paths.
  3056. if [ -d RCS ]
  3057. then RCSDIR=RCS/
  3058. else RCSDIR=
  3059. fi
  3060. X
  3061. X# Version number stuff, log message file
  3062. VERSIONFILE=${RCSDIR}.rcsfreeze.ver
  3063. LOGFILE=${RCSDIR}.rcsfreeze.log
  3064. X# Initialize, rcsfreeze never run before in the current directory
  3065. X[ -r $VERSIONFILE ] || { echo 0 >$VERSIONFILE && >>$LOGFILE; } || exit
  3066. X
  3067. X# Get Version number, increase it, write back to file.
  3068. VERSIONNUMBER=`cat $VERSIONFILE` &&
  3069. VERSIONNUMBER=`expr $VERSIONNUMBER + 1` &&
  3070. echo $VERSIONNUMBER >$VERSIONFILE || exit
  3071. X
  3072. X# Symbolic Revision Number
  3073. SYMREV=C_$VERSIONNUMBER
  3074. X# Allow the user to give a meaningful symbolic name to the revision.
  3075. SYMREVNAME=${1-$SYMREV}
  3076. echo >&2 "rcsfreeze: symbolic revision number computed: \"${SYMREV}\"
  3077. rcsfreeze: symbolic revision number used:     \"${SYMREVNAME}\"
  3078. rcsfreeze: the two differ only when rcsfreeze invoked with argument
  3079. rcsfreeze: give log message, summarizing changes (end with EOF or single '.')" \
  3080. X    || exit
  3081. X
  3082. X# Stamp the logfile. Because we order the logfile the most recent
  3083. X# first we will have to save everything right now in a temporary file.
  3084. TMPLOG=/tmp/rcsfrz$$
  3085. trap 'rm -f $TMPLOG; exit 1' 1 2 13 15
  3086. X# Now ask for a log message, continously add to the log file
  3087. X(
  3088. X    echo "Version: $SYMREVNAME($SYMREV), Date: $DATE
  3089. X-----------" || exit
  3090. X    while read MESS
  3091. X    do
  3092. X        case $MESS in
  3093. X        .) break
  3094. X        esac
  3095. X        echo "    $MESS" || exit
  3096. X    done
  3097. X    echo "-----------
  3098. X" &&
  3099. X    cat $LOGFILE
  3100. X) >$TMPLOG &&
  3101. X
  3102. X# combine old and new logfiles
  3103. cp $TMPLOG $LOGFILE &&
  3104. rm -f $TMPLOG || exit
  3105. trap 1 2 13 15
  3106. X
  3107. X# Now the real work begins by assigning a symbolic revision number
  3108. X# to each rcs file. Take the most recent version of the main trunk.
  3109. X
  3110. status=
  3111. X
  3112. for FILE in ${RCSDIR}*
  3113. do
  3114. X#   get the revision number of the most recent revision
  3115. X    HEAD=`rlog -h $FILE` &&
  3116. X    REV=`echo "$HEAD" | sed -n 's/^head:[     ]*//p'` &&
  3117. X#   assign symbolic name to it.
  3118. X    echo >&2 "rcsfreeze: $REV $FILE" &&
  3119. X    rcs -q -n$SYMREVNAME:$REV $FILE || status=$?
  3120. done
  3121. X
  3122. exit $status
  3123. END_OF_FILE
  3124. if test 3267 -ne `wc -c <'src/rcsfreeze.sh'`; then
  3125.     echo shar: \"'src/rcsfreeze.sh'\" unpacked with wrong size!
  3126. fi
  3127. # end of 'src/rcsfreeze.sh'
  3128. fi
  3129. if test -f 'src/rcskeys.c' -a "${1}" != "-c" ; then 
  3130.   echo shar: Will not clobber existing file \"'src/rcskeys.c'\"
  3131. else
  3132. echo shar: Extracting \"'src/rcskeys.c'\" \(2683 characters\)
  3133. sed "s/^X//" >'src/rcskeys.c' <<'END_OF_FILE'
  3134. X/*
  3135. X *                     RCS keyword table and match operation
  3136. X */
  3137. X
  3138. X/* Copyright (C) 1982, 1988, 1989 Walter Tichy
  3139. X   Copyright 1990, 1991 by Paul Eggert
  3140. X   Distributed under license by the Free Software Foundation, Inc.
  3141. X
  3142. This file is part of RCS.
  3143. X
  3144. RCS is free software; you can redistribute it and/or modify
  3145. it under the terms of the GNU General Public License as published by
  3146. the Free Software Foundation; either version 2, or (at your option)
  3147. any later version.
  3148. X
  3149. RCS is distributed in the hope that it will be useful,
  3150. but WITHOUT ANY WARRANTY; without even the implied warranty of
  3151. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  3152. GNU General Public License for more details.
  3153. X
  3154. You should have received a copy of the GNU General Public License
  3155. along with RCS; see the file COPYING.  If not, write to
  3156. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  3157. X
  3158. Report problems and direct all questions to:
  3159. X
  3160. X    rcs-bugs@cs.purdue.edu
  3161. X
  3162. X*/
  3163. X
  3164. X
  3165. X
  3166. X/* $Log: rcskeys.c,v $
  3167. X * Revision 5.2  1991/08/19  03:13:55  eggert
  3168. X * Say `T const' instead of `const T'; it's less confusing for pointer types.
  3169. X * (This change was made in other source files too.)
  3170. X *
  3171. X * Revision 5.1  1991/04/21  11:58:25  eggert
  3172. X * Don't put , just before } in initializer.
  3173. X *
  3174. X * Revision 5.0  1990/08/22  08:12:54  eggert
  3175. X * Add -k.  Ansify and Posixate.
  3176. X *
  3177. X * Revision 4.3  89/05/01  15:13:02  narten
  3178. X * changed copyright header to reflect current distribution rules
  3179. X * 
  3180. X * Revision 4.2  87/10/18  10:36:33  narten
  3181. X * Updating version numbers. Changes relative to 1.1 actuallyt
  3182. X * relative to 4.1
  3183. X * 
  3184. X * Revision 1.2  87/09/24  14:00:10  narten
  3185. X * Sources now pass through lint (if you ignore printf/sprintf/fprintf 
  3186. X * warnings)
  3187. X * 
  3188. X * Revision 4.1  83/05/04  10:06:53  wft
  3189. X * Initial revision.
  3190. X * 
  3191. X */
  3192. X
  3193. X
  3194. X#include "rcsbase.h"
  3195. X
  3196. libId(keysId, "$Id: rcskeys.c,v 5.2 1991/08/19 03:13:55 eggert Exp $")
  3197. X
  3198. X
  3199. char const *const Keyword[] = {
  3200. X    /* This must be in the same order as rcsbase.h's enum markers type. */
  3201. X    nil,
  3202. X    AUTHOR, DATE, HEADER, IDH,
  3203. X    LOCKER, LOG, RCSFILE, REVISION, SOURCE, STATE
  3204. X};
  3205. X
  3206. X
  3207. X
  3208. X    enum markers
  3209. trymatch(string)
  3210. X    char const *string;
  3211. X/* function: Checks whether string starts with a keyword followed
  3212. X * by a KDELIM or a VDELIM.
  3213. X * If successful, returns the appropriate marker, otherwise Nomatch.
  3214. X */
  3215. X{
  3216. X        register int j;
  3217. X    register char const *p, *s;
  3218. X    for (j = sizeof(Keyword)/sizeof(*Keyword);  (--j);  ) {
  3219. X        /* try next keyword */
  3220. X        p = Keyword[j];
  3221. X        s = string;
  3222. X        while (*p++ == *s++) {
  3223. X            if (!*p)
  3224. X                switch (*s) {
  3225. X                case KDELIM:
  3226. X                case VDELIM:
  3227. X                    return (enum markers)j;
  3228. X                default:
  3229. X                    return Nomatch;
  3230. X                }
  3231. X        }
  3232. X        }
  3233. X        return(Nomatch);
  3234. X}
  3235. X
  3236. END_OF_FILE
  3237. if test 2683 -ne `wc -c <'src/rcskeys.c'`; then
  3238.     echo shar: \"'src/rcskeys.c'\" unpacked with wrong size!
  3239. fi
  3240. # end of 'src/rcskeys.c'
  3241. fi
  3242. if test -f 'src/rcsmap.c' -a "${1}" != "-c" ; then 
  3243.   echo shar: Will not clobber existing file \"'src/rcsmap.c'\"
  3244. else
  3245. echo shar: Extracting \"'src/rcsmap.c'\" \(3048 characters\)
  3246. sed "s/^X//" >'src/rcsmap.c' <<'END_OF_FILE'
  3247. X/* RCS map of character types */
  3248. X
  3249. X/* Copyright (C) 1982, 1988, 1989 Walter Tichy
  3250. X   Copyright 1990, 1991 by Paul Eggert
  3251. X   Distributed under license by the Free Software Foundation, Inc.
  3252. X
  3253. This file is part of RCS.
  3254. X
  3255. RCS is free software; you can redistribute it and/or modify
  3256. it under the terms of the GNU General Public License as published by
  3257. the Free Software Foundation; either version 2, or (at your option)
  3258. any later version.
  3259. X
  3260. RCS is distributed in the hope that it will be useful,
  3261. but WITHOUT ANY WARRANTY; without even the implied warranty of
  3262. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  3263. GNU General Public License for more details.
  3264. X
  3265. You should have received a copy of the GNU General Public License
  3266. along with RCS; see the file COPYING.  If not, write to
  3267. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  3268. X
  3269. Report problems and direct all questions to:
  3270. X
  3271. X    rcs-bugs@cs.purdue.edu
  3272. X
  3273. X*/
  3274. X
  3275. X#include "rcsbase.h"
  3276. X
  3277. libId(mapId, "$Id: rcsmap.c,v 5.2 1991/08/19 03:13:55 eggert Exp $")
  3278. X
  3279. X/* map of character types */
  3280. X/* ISO 8859/1 (Latin-1) */
  3281. enum tokens const ctab[] = {
  3282. X    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,
  3283. X    SPACE,    SPACE,    NEWLN,    SPACE,    SPACE,    SPACE,    UNKN,    UNKN,
  3284. X    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,
  3285. X    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,
  3286. X    SPACE,    IDCHAR,    IDCHAR,    IDCHAR,    DELIM,    IDCHAR,    IDCHAR,    IDCHAR,
  3287. X    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    DELIM,    IDCHAR,    PERIOD,    IDCHAR,
  3288. X    DIGIT,    DIGIT,    DIGIT,    DIGIT,    DIGIT,    DIGIT,    DIGIT,    DIGIT,
  3289. X    DIGIT,    DIGIT,    COLON,    SEMI,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,
  3290. X    SBEGIN,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,
  3291. X    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,
  3292. X    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,
  3293. X    LETTER,    LETTER,    LETTER,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,
  3294. X    IDCHAR,    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,
  3295. X    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,
  3296. X    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,
  3297. X    Letter,    Letter,    Letter,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    UNKN,
  3298. X    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,
  3299. X    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,
  3300. X    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,
  3301. X    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,    UNKN,
  3302. X    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,
  3303. X    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,
  3304. X    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,
  3305. X    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,    IDCHAR,
  3306. X    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,
  3307. X    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,
  3308. X    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    IDCHAR,
  3309. X    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    LETTER,    Letter,
  3310. X    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,
  3311. X    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,
  3312. X    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,    IDCHAR,
  3313. X    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,    Letter,    Letter
  3314. X};
  3315. END_OF_FILE
  3316. if test 3048 -ne `wc -c <'src/rcsmap.c'`; then
  3317.     echo shar: \"'src/rcsmap.c'\" unpacked with wrong size!
  3318. fi
  3319. # end of 'src/rcsmap.c'
  3320. fi
  3321. echo shar: End of archive 1 \(of 11\).
  3322. cp /dev/null ark1isdone
  3323. MISSING=""
  3324. for I in 1 2 3 4 5 6 7 8 9 10 11 ; do
  3325.     if test ! -f ark${I}isdone ; then
  3326.     MISSING="${MISSING} ${I}"
  3327.     fi
  3328. done
  3329. if test "${MISSING}" = "" ; then
  3330.     echo You have unpacked all 11 archives.
  3331.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  3332. else
  3333.     echo You still need to unpack the following archives:
  3334.     echo "        " ${MISSING}
  3335. fi
  3336. ##  End of shell archive.
  3337. exit 0
  3338.